Skip to main content
Use the desired agent id under your account in the WebSocket URL.
Here is an example:

OPENHOME_API_KEY

Checkout API Docs to get OPENHOME_API_KEY

AGENT_ID

Checkout Get Agents section to get your account’s agent ids.
  • 4727: Represents the agent ID.
  • Set the agent ID to 0 to skip this part. This will start the call with the default agent, OpenHome.

WebSocket Flow

Audio Data Format

Audio data sent to the WebSocket must adhere to the following specifications:
  • Format: 16-bit PCM
  • Sample Rate: 16000 Hz
  • Encoding: Base64
Ensure that the audio is converted to this format before sending it to the WebSocket.

WebSocket Message Structure

Client to Server Messages

  1. User to Server Text Messages
  2. User to Server Audio Messages

Server to Client Messages

  1. Server to User Text Messages
    live: true indicates live transcription or response logs. final: true provides finalized transcription and response messages.
  2. Server to User Audio Messages

EXAMPLES

Find More Examples on GitHub