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 recording(s). With several voice parts, either one phrase that every take repeated, or one phrase per take separated by commas, in the same order as the files. |
session_id | string | Optional. Links the enrollment to a session. |
vocabulary | string | Optional. Vocabulary to use for voice recognition. Defaults to en_digits. Examples: en_digits, en_sub. |
use_session_video is not supported here — see
Face Enrollment for why.
File parts
- voice* (Audio file) — the recording used to enroll the voice. Repeat the part to send several takes in one request.
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" }}