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
  • Adapt Voice
  • Cookie Information:
  • Success 200

Was this helpful?

  1. Voice Engine

Adapt Voice

PreviousVerify VoiceNextDelete User Voice Enroll

Last updated 6 years ago

Was this helpful?

To perform an adaption to the user’s biometric voice sample registered on the engine, the method to be used is Adapt Voice. Similar to the voice verification process, the first request to this method will start the voice adaption process, returning the expected sample to be present on the next request. If the sample provided is suitable for adaption the system will proceed to adapt the user’s biometric voice registry and responds with success. In case of verification/validation failure of the user’s sample, the system will return that the sample isn’t suitable for adaption is necessary to repeat the process again to proceed to voice adaption.

Adapt Voice

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

Adapt User's voice enroll on 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 on 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": "Isolated"
    }
}
//Adapt Audio
{
    "status": true,
    "data": {
      "message": "CLAIMANT_ADAPTED_WITH_SUCCESS"
      "dialogueId": "e99766b5-9b28-4f0e-99dc-30eaa5b4c33d",
      "adapted": true
    }
}
//Adapt Voice Failed
{
    "status": false,
    "data": {
        "message": "AUDIO_SAMPLE_NOT_SUITABLE_FOR_ADAPTION"
     }
}
//Voice Verification Failed
{
    "status": false,
    "data": {
        "dialogueStatus": "Failed",
        "message": "AUDIO_RECOGNITION_FAILED",
        "reason": "MaxTotalSqmFailuresExceeded",
        "decision": "Misspeak"
     }
}
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 not enroled on this provider.
{
    "status": false,
    "data": {
        "message": "ENROLL_USER_VOICE_FIRST"
    }
}
// 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.

adapted

Boolean

If true, indicates the adaption process was completed.

WAVE FILE SAMPLE FORMAT