Command | Description |
---|---|
CLIENT_TO_SERVER_SYNC | Clients uses this command to send audio bytes received from microphone or text to server |
SERVER_TO_CLIENT_SYNC | Server uses this command to send audio bytes to be played to the user or text to be displayed to the users terminal |
END_OF_TURN | Server sends this command to indicate that the response for a dialog request is completed |
STOP | If client wants to stop the conversation and close the websocket connection, it can send this command |
ABORT_AUDIO | When server detects that the user has interrupted the conversation, it will send this command to client so that client can stop playing any buffered audio and listen to the user input |
UPDATE_MESSAGE_STATUS | Client can send this message to update the server that audio bytes for a particular dialog has been played |
Type | Description | Format |
---|---|---|
AUDIO | Audio data payload | For BROWSER connections: PCM audio with FLOAT32 encoding, 44.1kHz sample rate, 32-bit depth, and 128-sample chunks. For TWILIO/PLIVO connections: Format is automatically handled by Trata |
TEXT | Text data payload | Text string |