Method: CHANNEL
Version: 1.0.1
## Messages

### ConnectRequest

#### Payload Schema

- **command** (string, required)
  Connect message

- **version** (integer, required)
  Protocol version

- **callId** (string, required)
  Unique Call ID

- **serviceId** (string, required)
  Service Unique ID

- **sttLanguage** (string, required)
  BCP-47 language tag used for speech-to-text transcription of the inbound audio.

This is the language set in the SVAML command when the voice relay session was initiated.

- **ttsVoice** (string, required)
  Name of the default voice that will be used when synthesizing speech.

This is the TTS voice name set in the SVAML command when the voice relay session was initiated.

- **interruptionsEnabled** (boolean, required)
  Indicates if automatic interruption on detected speech is enabled for this session.

- **callHeaders** (object, required)
  Arbitrary key/value pairs (header name -> header value).

### AnswerResponse

#### Payload Schema

- **command** (string, required)

### TextMessage

#### Payload Schema

- **command** (string, required)

- **text** (string, required)
  Transcribed text from the voice channel. This is the speech-to-text output of the incoming audio.

- **sttLanguage** (string, required)
  BCP-47 language tag used for speech-to-text transcription of the inbound audio.

- **isCorrection** (boolean, required)
  Indicates whether this message corrects a previous transcription. 

This occurs when additional speech is detected after a pause, refining the earlier transcription result.

### TextResponseMessage

#### Payload Schema

- **command** (string, required)

- **text** (string, required)
  Plain text or SSML to synthesize and play on the active voice channel.

When streaming, send this field in multiple messages with `isLast: false` until
the final chunk, which must have `isLast: true`.

When using SSML, tags must not span across message boundaries within a batch.
Each chunk must be independently valid XML if SSML is used.

- **format** (string)
  Enum: TEXT, SSML

- **ttsVoice** (string)
  Name of the TTS voice to use for this batch.

Only the value from the first message in a batch takes effect; this field is ignored
on subsequent messages in the same batch. If omitted, the default voice configured
when the session was initiated is used.

- **isLast** (boolean, required)
  Indicates whether this is the final message in the current TTS batch.

Set to `false` on all intermediate chunks and `true` on the last chunk to signal
the end of the batch and trigger an audio flush. The next message with `isLast: false`
begins a new batch.

- **isInterruptible** (boolean)
  Controls whether speech detected on the voice channel can automatically interrupt
this TTS batch.

Overrides the `enableInterruptions` setting from the session for this batch only.
Even when set to `false`, playback can still be stopped by explicitly sending an
`interrupt` command over the WebSocket. Defaults to `true` when not specified.

### InterruptDetect

#### Payload Schema

- **command** (string, required)

- **reason** (string, required)
  The reason that triggered the interrupt message.
  Enum: speech-detected

### Interrupt

#### Payload Schema

- **command** (string, required)

### DtmfReceive

#### Payload Schema

- **command** (string, required)

- **sequence** (string, required)
  A single or multiple DTMF tones.

### DtmfSend

#### Payload Schema

- **command** (string, required)

- **sequence** (string, required)
  A single or multiple DTMF tones.

### PlaybackEvent

#### Payload Schema

- **command** (string, required)
  Identifies the type of playback event.
  Enum: textPlaybackStart, textPlaybackStop, textPlaybackCancel

- **batchSequence** (integer, required)
  Auto-incrementing sequence number that identifies the TTS batch this event relates to.

The sequence starts at `0` for the first batch sent after the session is accepted and
increments by `1` for each subsequent batch. Use this value to correlate playback
events with the `textResponse` messages sent from the server.