Enroll Voice

To perform the user’s biometric voice enrollment, the method to be used is Enroll Voice. On this type of biometric analysis, we need several calls to this method in order to complete the enrollment step. On the first request to this method, the system will start the voice enrollment process returning the audio sample expected to be present on the next request (not expecting any file on the first request) and so on until the enrollment process is finished. In case of success, the user’s biometric voice registry will be created on the biometric engine chosen, allowing further identifications. In case of failure, it’s necessary to repeat this process until the enrollment is accepted.

Enroll Voice

POST Https://api.biometrid.com/api/1.0/users/:userId/dialogue/enroll/voice

Enroll user's voice on client's chosen provider.

Path Parameters

Name
Type
Description

userID

string

BiometrID user ID

Headers

Name
Type
Description

cookie

string

biometrid.sid cookie should be set on the request. See section above.

Content-type

string

Request content type (This is not required to be set. Referenced only to show how we expect data to be sent). { "Content-Type": "multipart/form-data" }

x-biometrid-key

string

Application Client Key

x-biometrid-secret

string

Application Client Secret

Request Body

Name
Type
Description

language

string

Code from the available languages for the client (ex: 'en' or 'pt') If none present, sets the default.

audio

object

Audio file with the vocal biometrid sample. (only .wav format) - additional info in the next table

HTTP/1.1 200 OK
//Dialogue Started
{
    "status": true,
    "data": {
      "message": "DIALOGUE_STARTED_WITH_SUCCESS",
      "dialogueId": "e99766b5-9b28-4f0e-99dc-30eaa5b4c33d",
      "promptCode": "0653",
      "promptCodeText": "zero six five three"
    }
}
// Audio Submitted
{
    "status": true,
    "data": {
      "message": "AUDIO_SUBMITTED_WITH_SUCCESS",
      "promptCode": "0653",
      "promptCodeText": "zero six five three",
      "decision": "OK"
    }
}
//Audio Enrolled
{
    "status": true,
    "data": {
      "dialogueStatus": "Suceeded",
      "message": "AUDIO_ENROLLED_WITH_SUCCESS",
      "enrolled": true
    }
}
//Voice Enrollment Failed
{
    "status": false,
    "data": {
        "dialogueStatus": "Failed",
        "message": "AUDIO_ENROLLMENT_FAILED",
        "reason": "MaxTotalSqmFailuresExceeded",
        "decision": "NotApplicable"
      }
}

Important: For security reasons the audio file MIME type should correspond to a .wav file (ie: Content-Type: audio/wav, audio/x-wav, ect...).

WAVE FILE SAMPLE FORMAT

Biometrid uses session in the server side to keep some informations about the current process. It's mandatory for voice processes that the cookie="biometrid.sid=..." should be present on the request.

Success 200

Field

Type

Description

status

Boolean

Response status.

data

Object

Response main data.

message

String

Message regarding process status.

dialogueId

String

Dialogues identifier.

promptCode

String

Dialogue prompt for user's audio file.

promptCodeText

String

Dialogue prompt presented in words for user's audio file.

dialogueStatus

String

If present, indicates the final status of the enrollment process.

decision

String

If present, indicates the provider decision on the submitted sample.

reason

String

(Error field) If present, this field indicates the reason of failure.

enrolled

Boolean

If true, indicates the enrollment process is completed.

Last updated

Was this helpful?