Voice Enrollment
Enroll a 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/v2/enrollments/voiceHeaders
- Authorization* - Your API Token.
request part fields
| Field | Type | Description |
|---|---|---|
user_id* | string | Opaque, customer-provided identity key for the user being enrolled. |
phrase* | string | Transcription of the digits said in the audio file. |
vocabulary | string | Optional. Vocabulary to use for voice recognition. Defaults to en_digits. Examples: en_digits, en_sub. |
File parts
- voice* (Audio file) — the recording used to enroll the voice.
Responses
The success envelope. data.enrolled is true on success.
Response sample:
{ "data": { "enrolled": true, "user_id": "user-123" }, "meta": { "request_id": "fc5605c5-...", "message": "voice registered successfully" }}{ "error": { "code": "invalid_request", "message": "phrase is required" }, "meta": {} }{ "error": { "code": "audio_unreadable", "message": "the audio failed a quality check" }, "meta": {} }Sample
Request
curl --location 'https://api.biometrysolutions.com/api-gateway/v2/enrollments/voice' \ --header 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJhbGciO...ANYea8r2xOG-Urc' \ --form 'request={"user_id":"user-123","phrase":"one two three four five six seven eight"}' \ --form 'voice=@"/[path to your file]/words.mov"'Response
{ "data": { "enrolled": true, "user_id": "user-123" }, "meta": { "request_id": "fc5605c5-...", "message": "voice registered successfully" }}