For the complete documentation index, see llms.txt. This page is also available as Markdown.

/api/v1/enrollment

This endpoint is used to enroll a new voice. It receives one or more audio files and returns a voice template. The voice template is a string that contains the biometric information of the voice. This template can be used to authenticate voices in the future.

post
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body

Enrollment request body

audiosstring[] · max: 5Required

The array length can be 1, or from 3 to 5. Sending 2 audios or more than 5 is not valid. 1 audio for text-independent enrollment. 3 to 5 audios for text-dependent enrollment.

Example: /9j/4AAQSkZJRgABAQEAtAC0AAD...
check_livenessbooleanOptional

If true, a liveness check will be performed

Default: falseExample: false
check_qualitybooleanOptional

If true, a quality check will be performed

Default: trueExample: true
liveness_thresholdnumberOptional

Threshold for liveness detection. If the liveness probability is below this value, the audio is considered invalid.

Default: 0.5Example: 0.5
minimum_snr_dbnumberOptional

Minimum SNR in dB for the audio to be considered valid.

Default: 8Example: 8
minimum_speech_duration_msnumberOptional

Minimum audio duration in milliseconds for it to be considered valid.

Default: 1000Example: 1000
minimum_speech_relative_lengthnumberOptional

Minimum relative speech length (speech length relative to the total audio duration).

Default: 0Example: 0
maximum_multiple_speakers_detector_scorenumberOptional

Maximum score allowed by the multiple speakers detector.

Default: 1Example: 1
extra_datastringOptional

Tokenized data to invoke the Api Tracking service after the operation, encoded in base64.

Example: BQABAQGkJhiCqQjKYUZyDM...
Responses
200

The result of the voice enrollment. The *_detected fields are only present when the audio quality check fails.

application/json

Enrollment response

operation_resultnumber · enumOptional

Result of the operation.

Example: 3Possible values:
template_typestringOptional

Type of template returned as the result of the operation.

Example: text-dependent
templatestringOptional

Biometric template buffer, obtained from Enrollment(), encrypted and encoded in base64 RFC4648.

Example: BAEBGgEroySjGz2C9iIki35J/FA...
post/api/v1/enrollment
POST /api/v1/enrollment HTTP/1.1
Host: 127.0.0.1:6982/
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 288

{
  "audios": [
    "/9j/4AAQSkZJRgABAQEAtAC0AAD..."
  ],
  "check_liveness": false,
  "check_quality": true,
  "liveness_threshold": 0.5,
  "minimum_snr_db": 8,
  "minimum_speech_duration_ms": 1000,
  "minimum_speech_relative_length": 0,
  "maximum_multiple_speakers_detector_score": 1,
  "extra_data": "BQABAQGkJhiCqQjKYUZyDM..."
}
{
  "operation_result": 3,
  "template_type": "text-dependent",
  "template": "BAEBGgEroySjGz2C9iIki35J/FA...",
  "validate_audios_result": [
    {
      "audio_position": 0,
      "result_code": 3,
      "liveness_score": 0.9,
      "matching_score": 0.9,
      "snr_db_detected": 8,
      "speech_length_ms_detected": 1000,
      "speech_relative_length_detected": 0.5,
      "multiple_speakers_score_detected": 1
    }
  ]
}

Last updated