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:
{
"token": "token",
"users": "user1, user2",
"time": "2024-09-02T12:00:00Z"
}
Parameter | Type | Description |
---|---|---|
| String | The token associated with the session. |
| String | The users involved in the session. |
| 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:
{
"token": "token",
"users": "user1, user2",
"time": "2024-09-02T12:00:00Z"
}
Parameter | Type | Description |
---|---|---|
| String | The token associated with the session. |
| String | The users involved in the session. |
| 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 |
---|---|---|---|
| String | Yes | The token generated at the beginning of the call associated with this session. |
Payload:
[
{
"limitType": "NORMAL",
"bioUserId": "Master",
"bioResult": "TRUE_HIGH",
"bioScore": 0.9,
"llr": 1.23,
"speechMillis": 15440,
"errorType": null
}
]
Parameter | Type | Description |
---|---|---|
| String | Type of the verification limit. |
| String | Identifier for the user. |
| String | Result of the biometric verification. |
| Float | Score of the biometric verification. |
| Float | Log-likelihood ratio. |
| Integer | Duration of speech in milliseconds. |
| 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 |
---|---|---|---|
| String | Yes | The token generated at the beginning of the call associated with this session. |
Payload:
{
"status": "CALL_OPENED"
}
Parameter | Type | Description |
---|---|---|
| String | The status of the call. |
SEND: TTS-Detection-{token}
This event is used for handling TTS detection results.
Parameters
Field | Type | Required | Description |
---|---|---|---|
| String | Yes | The token generated at the beginning of the call associated with this session. |
Payload:
{
"label": "TTS_Detected",
"detectionScore": 0.98
}
Parameter | Type | Description |
---|---|---|
| String | The label for the TTS detection result. |
| 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 |
---|---|---|---|
| String | Yes | The token generated at the beginning of the call associated with this session. |
Payload:
[
{
"label": "MATCH",
"status": "CHECKED",
"risk_level": "HIGH_RISK",
"custom_agent_message": "Blocklisted voice has been detected",
"custom_ui_message": "blocklisted"
}
]
Parameter | Type | Description |
---|---|---|
| String | The label of the blocklist entry. |
| String | The status of the blocklist entry. |
| String | The risk level associated with the blocklist. |
| String | Custom message for agents. |
| String | Custom UI message. |
SEND: clean-speech-{token}
This event is used for monitoring the detection of clean speech.
Parameters
Field | Type | Required | Description |
---|---|---|---|
| String | Yes | The token generated at the beginning of the call associated with this session. |
Payload:
{
"enoughSpeechDetected": true,
"cleanSpeechDuration": 10345
}
Parameter | Type | Description |
---|---|---|
| Boolean | Indicates if enough clean speech was detected. |
| Number | The duration of clean speech detected in milliseconds. |