Voice Enrollment
Enroll voice for voice recognition.
Authorization
This endpoint requires an API token as Bearer in the Authorization header. Go to Authorization guide for details.
Request (POST)
POST https://api.biometrysolutions.com/api-gateway/enroll/voiceHeaders
- Authorization* - Your API Token.
- X-User-Fullname* - Pass the full name of end-user that consented to store his biometric data.
- X-Session-ID - Include the session ID to link transactions within a unified group.
Parameters
- unique_id* (String) - Unique ID for the file.
- phrase* (String) - Transcription of the digits said in the audio file.
- voice* (Audio file) - The file that will be used to identify voice in the future.
- vocabulary (String, optional) - Vocabulary to use for voice recognition. Defaults to
en_digitsif not provided. Examples:en_digits,en_sub.
Responses
The object with data and message fields.
-
data- Status of the enrolled voice.qa_combined- Indicates quality check applied to combined audio. e.g. minimum total frames.qa_list- Each item of the qa_list array corresponds to an audio in the request, in order.status- Status of the enrolled voice.good- The voice was successfully enrolledenrolled- The voice was already enrollederror- The voice could not be enrolled because of an errorqafailed- The voice could not be enrolled because the audio failed a quality assurance check
-
message- Message with the status of processed audio.
Response sample:
{ "data": { "qa_combined": QualityResultList, "qa_list": [QualityResultList], "status": "string" } "message": "string"}Bad Request error object.
Response sample:
{ "error": "string"}Internal server error object.
Response sample:
{ "error": "string"}Objects
QualityResultList
This item is an array of QualityResult and RecognitionResult.
QualityResult
| Name | Type | Description |
|---|---|---|
status | string | Indicates if check passed. Values are either good or fail. |
property | string | Configuration property controlling the threshold. |
value | number | The actual value calculated from the utterance. |
op | string | The comparison operator. If the comparison returns true, the status is good, meaning the check passes. Possible values: <, <=, >, >=, ==, !=. |
threshold | number | The threshold value. |
RecognitionResult
| Name | Type | Description |
|---|---|---|
status | string | Indicates if recognition was successful. Values are either good or fail. |
property | string | Result indicator. |
results | array | An array of RecognitionHypothesis. |
RecognitionHypothesis
| Name | Type | Description |
|---|---|---|
text | string | Raw recognized text. |
score | number | Indicates the relative log probability of this hypothesis. |
Sample
Request
curl --location 'https://api.biometrysolutions.com/api-gateway/enroll/voice' \ --header 'X-User-Fullname: John Doe' \ --header 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJhbGciO...ANYea8r2xOG-Urc' \ --form 'voice=@"/[path to your file]/words.mov"' \ --form 'unique_id="someid"' \ --form 'phrase="one two three four five six seven eight"' \ --form 'vocabulary="en_digits"' \Response
{ "data": { "qa_combined": null, "qa_list": [], "status": "enrolled" }, "message": "voice registered successfully"}