Legacy Restful API
1.0.0
1.0.0
  • Introduction
  • Biometric Engines
  • Getting Started
  • User
    • Create User
    • Delete User
  • Face Engine
    • Enroll Face
    • Verify Face
    • Adapt Face
    • Delete User Face Enroll
    • Find User Id by Face
    • Find Multiple Id by Face
    • Find Face Properties
  • Liveness
    • Biometrics Status
    • Biometrics Liveness
  • Voice Engine
    • Enroll Voice
    • Verify Voice
    • Adapt Voice
    • Delete User Voice Enroll
    • Get Available Languages
  • OCR Engine
    • Validate Document
    • Validate Document (base64)
    • Verify document photo
    • Verify document photo (base64)
  • Auxiliar Methods
    • Get enroll Status
    • Has Pending Dialogue
    • Restart User State
    • Find UserId by MacAddress
Powered by GitBook
On this page
  • Enroll Voice
  • Cookie Information:
  • Success 200

Was this helpful?

  1. Voice Engine

Enroll Voice

PreviousBiometrics LivenessNextVerify Voice

Last updated 6 years ago

Was this helpful?

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"
      }
}
HTTP/1.1 400 Bad Request
//No audio file detected on request. Not sent or invalid format.
{
    "status": false,
    "data": {
        "message": "NO_FILE_OR_INVALID_FORMAT"
    }
}
//User voice already enrolled.
{
    "status": false,
    "data": {
        "message": "USER_VOICE_ALREADY_ENROLLED"
    }
}
// Missing Headers
{
    "status": false,
    "data": {
        "message": "AUTHENTICATION_HEADERS_MISSING"
    }
}
HTTP/1.1 401 Unauthorized
{
    "status": false,
    "data": {
        "message": "INVALID_AUTHENTICATION_HEADERS"
    }
}
HTTP/1.1 402 Payment Required
{
    "status": false,
    "data": {
        "message": "REQUEST_LIMIT_REACHED"
    }
}
HTTP/1.1 404 Not Found
// No active engine configuration for this provider.
{
    "status": false,
    "data": {
        "message": "NO_VOICE_ENGINE_CONFIGURATION_AVAILABLE"
    }
}
 // User's id not exists in biometrid environment.
{
    "status": false,
    "data": {
        "message": "USERID_NOT_EXISTS"
    }
}
//Client not found by given key.
{
    "status": false,
    "data": {
        "message": "CLIENT_NOT_FOUND/CHECK_AUTHENTICATION_HEADERS"
    }
}

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

Cookie Information:

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.

WAVE FILE SAMPLE FORMAT