ForgetMe gRPC API

The ForgetMe gRPC API contains one method for requesting the removal of speaker profiles.

The ForgetMe service is limited to individually approved customers. To use it, see Credentials for ForgetMe.

Proto file structure

ASRaaS provides protocol buffer (.proto) files to define the ForgetMe service. See gRPC setup to download these files.

  • forgetme.proto contains the methods and messages for deleting speaker profiles.
  • The RPC files contain status and error messages.

You may use these proto files in conjunction with the other ASRaaS proto files described in the Recognizer API.

└── nuance
    ├── asr
    │   ├── forgetme     
    │   │   └── v1   
    │   │       └── forgetme.proto  
    │   ├── v1
    │   │   ├── recognizer.proto
    │   │   ├── resource.proto
    │   │   └── result.proto
    │   └── v1beta1
    │       └── training.proto
    └── rpc (RPC message files) 
  Fields in ForgetMe API  

For the RPC fields, see RPC gRPC messages.

ForgetMe

The ForgetMe service offers one RPC method for deleting speaker profiles.

caption
Method Request and response Description
DeleteSpeakerProfiles

DeleteSpeakerProfilesRequest

DeleteSpeakerProfilesResponse

Remove a speaker profile (unary).

DeleteSpeakerProfilesRequest

Input message that requests deletion of all speaker profiles associated with a user ID. Each user ID may have one profile per language.

caption
Field Type Description
user_id string Mandatory. User id that identifies a speaker profile created in ASRaaS.
client_data map<string,string> Optional. Client-supplied key,value pairs (up to 20) to inject into the logs.

For example, this asks to delete the profile identified by the user ID erij.someone:

DeleteSpeakerProfilesRequest(
    user_id = 'erij.someone@aardvark.com',
    client_data = {'app_os':'CENTOS'} 
)

Speaker profiles are created in ASRaaS with RecognitionResource and RecognitionInitMessage. They are defined as SPEAKER_PROFILE resources and identified with a user ID.

This profile was created in ASRaaS with RecognitionResource and RecognitionInitMessage

# Define speaker profile   
speaker_profile = RecognitionResource(
    external_reference = ResourceReference(   
        type = 'SPEAKER_PROFILE'
    )
)   
# Include profile in RecognitionInitMessage   
init = RecognitionInitMessage(   
    parameters = RecognitionParameters( ... ),
    resources = [speaker_profile],   
    user_id = 'erij.someone@aardvark.com'
)

For more information, see Speaker profiles and RecognitionResource.

DeleteSpeakerProfilesResponse

Output message in response to a delete request.

caption
Field Type Description
nuance.rpc.Status Status Nuance RPC status of the request. OK means the data is not in the system anymore. NOT_FOUND means it was already deleted or never there.

This is a successful delete response:

2022-04-21 15:00:43,993 INFO : Received response: status {
  status_code: OK
  http_trans_code: 200
  status_message {
    locale: "en-US"
    message: "OK"
    message_resource_id: "1"
  }
}

But this request was unsuccessful as the profile was not found:

2022-04-21 15:10:30,020 INFO : Received response: status {
  status_code: NOT_FOUND
  status_sub_code: 6001
  http_trans_code: 404
  status_message {
    locale: "en-US"
    message: "Content not found for userId"
    message_resource_id: "6001"
  }
}

Scalar value types

The data types in the proto files are mapped to equivalent types in the generated client stub files.

Scalar data types
Proto Notes C++ Java Python
double double double float
float float float float
int32 Uses variable-length encoding. Inefficient for encoding negative numbers. If your field is likely to have negative values, use sint32 instead. int32 int int
int64 Uses variable-length encoding. Inefficient for encoding negative numbers. If your field is likely to have negative values, use sint64 instead. int64 long int/long
uint32 Uses variable-length encoding. uint32 int int/long
uint64 Uses variable-length encoding. uint64 long int/long
sint32 Uses variable-length encoding. Signed int value. These encode negative numbers more efficiently than regular int32s. int32 int int
sint64 Uses variable-length encoding. Signed int value. These encode negative numbers more efficiently than regular int64s. int64 long int/long
fixed32 Always four bytes. More efficient than uint32 if values are often greater than 2^28. uint32 int int
fixed64 Always eight bytes. More efficient than uint64 if values are often greater than 2^56. uint64 long int/long
sfixed32 Always four bytes. int32 int int
sfixed64 Always eight bytes. int64 long int/long
bool bool boolean boolean
string A string must always contain UTF-8 encoded or 7-bit ASCII text. string String str/unicode
bytes May contain any arbitrary sequence of bytes. string ByteString str