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 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_idstringOptional. Links the enrollment to a session.
vocabularystringOptional. 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" }
}

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