Skip to main content

WebSocket Interface

The WebSocket interface is a bidirectional communication protocol established over a WebSocket connection.

Between the client and server, command packets, command response packets, and event packets are continuously exchanged. Internally, there are three parallel state transition systems: a state transition system for voice input, a state transition system for utterance detection, and a state transition system for speech recognition processing. Each transition system has several states and repeatedly transitions based on its unique triggers.

Understanding these systems allows you to use this API without using the Wrp library provided for client applications (included with sample programs).

Endpoints

Logging

wss://acp-api.amivoice.com/v1/

No logging

wss://acp-api.amivoice.com/v1/nolog/

Authentication

Specify the API key using one of the following methods. For how to obtain it, see How to Issue API Keys.

Specify the API key as the authorization parameter in the s command packet.

authorization={API_KEY}

Specify one of the following headers in the HTTP request header when starting the WebSocket connection.

Authorization: Bearer {API_KEY}
Sec-WebSocket-Protocol: wrp, {API_KEY}

For details on authentication via request headers for the WebSocket interface, see How to Send Authentication Information in the HTTP Request Header in the manual.