Skip to content

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/voice

Headers

  • Authorization* - Your API Token.

request part fields

FieldTypeDescription
user_id*stringOpaque, customer-provided identity key for the user being enrolled.
phrase*stringTranscription of the digits said in the audio file.
vocabularystringOptional. 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" }
}

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" }
}