Skip to main content
Skip table of contents

Voice Biometrics Socket.IO API for Verification, and Status Monitoring

Overview

This API enables clients to interact with the http://Socket.IO server to initiate verification and status processes, as well as receive updates related to these processes.

Message Flow Explanation

  • RECEIVE: These events are used for the server to receive messages from the client. Clients utilize these events to initiate requests such as verification or status updates.

  • SEND: These events are used for the server to send responses back to the client. Responses may include verification scores, call status, TTS detection results, and more, which are received by the client.

Server:

  • wss://us1-m.ocp.ai/agent-socket/socket

    • Socket.IO Client Connection

      To establish a connection to the Socket.IO server, clients must use the following connection path:

      • Path: /agent-socket/socket.io

      • Transport: WebSocket

    • Namespace:/agent-socket/socket
      All interactions with the Socket.IO server are conducted under this namespace.


Events

RECEIVE: /agent-socket/socket/verification

The client uses this event to initiate verification. The score will be published on the verification-{token} event.
Payload:

JSON
{ 
  "token": "token",
  "users": "user1, user2",
  "time": "2024-09-02T12:00:00Z" 
}

Parameter

Type

Description

token

String

The token associated with the session.

users

String

The users involved in the session.

time

String

The timestamp of the message.


RECEIVE: /agent-socket/socket/status

The client uses this event to request status updates. Updates will be published on the status-{token} event.
Payload:

JSON
{ 
  "token": "token",
  "users": "user1, user2",
  "time": "2024-09-02T12:00:00Z" 
}

Parameter

Type

Description

token

String

The token associated with the session.

users

String

The users involved in the session.

time

String

The timestamp of the message.


SEND: verification-{token}

This event is used for receiving responses related to verification scores.

Parameters

Field

Type

Required

Description

token

String

Yes

The token generated at the beginning of the call associated with this session.

Payload:

JSON
[ 
  { 
    "limitType": "NORMAL", 
    "bioUserId": "Master", 
    "bioResult": "TRUE_HIGH", 
    "bioScore": 0.9, 
    "llr": 1.23, 
    "speechMillis": 15440, 
    "errorType": null 
  }
]

Parameter

Type

Description

limitType

String

Type of the verification limit.

bioUserId

String

Identifier for the user.

bioResult

String

Result of the biometric verification.

bioScore

Float

Score of the biometric verification.

llr

Float

Log-likelihood ratio.

speechMillis

Integer

Duration of speech in milliseconds.

errorType

String

Type of error, if any.


SEND: status-{token}

This event is used by the client to receive live call status.

Parameters

Field

Type

Required

Description

token

String

Yes

The token generated at the beginning of the call associated with this session.

Payload:

JSON
{ 
  "status": "CALL_OPENED"
}

Parameter

Type

Description

status

String

The status of the call.


SEND: TTS-Detection-{token}

This event is used for handling TTS detection results.

Parameters

Field

Type

Required

Description

token

String

Yes

The token generated at the beginning of the call associated with this session.

Payload:

JSON
{ 
  "label": "TTS_Detected",
  "detectionScore": 0.98
}

Parameter

Type

Description

label

String

The label for the TTS detection result.

detectionScore

Float

The score of the TTS detection.


SEND: blocklist-Detection-{token}

This event is used for handling blocklist detection results.

Parameters

Field

Type

Required

Description

token

String

Yes

The token generated at the beginning of the call associated with this session.

Payload:

JSON
[ 
  { 
    "label": "MATCH",
    "status": "CHECKED", 
    "risk_level": "HIGH_RISK", 
    "custom_agent_message": "Blocklisted voice has been detected",  
    "custom_ui_message": "blocklisted" 
  }
]

Parameter

Type

Description

label

String

The label of the blocklist entry.

status

String

The status of the blocklist entry.

risk_level

String

The risk level associated with the blocklist.

custom_agent_message

String

Custom message for agents.

custom_ui_message

String

Custom UI message.


SEND: clean-speech-{token}

This event is used for monitoring the detection of clean speech.

Parameters

Field

Type

Required

Description

token

String

Yes

The token generated at the beginning of the call associated with this session.

Payload:

JSON
{ 
  "enoughSpeechDetected": true,
  "cleanSpeechDuration": 10345 
}

Parameter

Type

Description

enoughSpeechDetected

Boolean

Indicates if enough clean speech was detected.

cleanSpeechDuration

Number

The duration of clean speech detected in milliseconds.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.