> ## Documentation Index
> Fetch the complete documentation index at: https://developers.telnyx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ConversationRelay

The `<ConversationRelay>` verb routes a call to a ConversationRelay service that provides voice interactions over a WebSocket connection. It provides speech-to-text transcription and allows requesting text-to-speech synthesis for the call over WebSocket.

## Attributes

<table>
  <thead>
    <tr>
      <th>ATTRIBUTE</th>
      <th>DESCRIPTION</th>
      <th>OPTIONS</th>
      <th>DEFAULT</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td><code>url</code></td>
      <td> The WebSocket URL of the conversation relay server. </td>

      <td />

      <td>-</td>
    </tr>

    <tr>
      <td><code>welcomeGreeting</code></td>
      <td> A greeting message to be spoken when the conversation relay session starts. </td>

      <td />

      <td>-</td>
    </tr>

    <tr>
      <td><code>voice</code></td>
      <td> The TTS voice to use (e.g., `Telnyx.Natural.abbie`, `Telnyx.NaturalHD.astra`). </td>

      <td />

      <td>-</td>
    </tr>

    <tr>
      <td><code>language</code></td>
      <td> The language for TTS and transcription (e.g., `en`, `fr`, `es`). </td>

      <td />

      <td>-</td>
    </tr>

    <tr>
      <td><code>transcriptionProvider</code></td>
      <td> The speech-to-text provider (e.g., `deepgram`). </td>

      <td />

      <td>-</td>
    </tr>

    <tr>
      <td><code>interruptible</code></td>
      <td> Whether TTS playback can be interrupted by the caller. `true` is an alias for `any`, `false` is an alias for `none`. </td>
      <td><code>none</code>, <code>any</code>, <code>speech</code>, <code>dtmf</code>, <code>true</code>, <code>false</code></td>
      <td><code>any</code></td>
    </tr>

    <tr>
      <td><code>welcomeGreetingInterruptible</code></td>
      <td> Whether the welcome greeting can be interrupted by the caller. `true` is an alias for `any`, `false` is an alias for `none`. </td>
      <td><code>none</code>, <code>any</code>, <code>speech</code>, <code>dtmf</code>, <code>true</code>, <code>false</code></td>
      <td><code>any</code></td>
    </tr>

    <tr>
      <td><code>dtmfDetection</code></td>
      <td> Whether to enable DTMF detection during the conversation relay session. </td>

      <td />

      <td><code>false</code></td>
    </tr>
  </tbody>
</table>

## Child verbs/nouns

<table>
  <thead>
    <tr>
      <th>NOUN/VERB</th>
      <th>DESCRIPTION</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td><code>Language</code></td>
      <td> Configures a supported language with optional per-language voice and provider settings. Multiple `<Language>` elements can be specified to enable multilingual conversations. </td>
    </tr>

    <tr>
      <td><code>Parameter</code></td>
      <td> Custom key-value parameter passed to the WebSocket server as assistant dynamic variables. </td>
    </tr>
  </tbody>
</table>

## Language Attributes

<table>
  <thead>
    <tr>
      <th>ATTRIBUTE</th>
      <th>DESCRIPTION</th>
      <th>OPTIONS</th>
      <th>DEFAULT</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td><code>code</code></td>
      <td> The language code (e.g., `en`, `fr`, `es`). </td>

      <td />

      <td>-</td>
    </tr>

    <tr>
      <td><code>ttsProvider</code></td>
      <td> The text-to-speech provider to use for this language (e.g., `telnyx`, `google`). </td>

      <td />

      <td>-</td>
    </tr>

    <tr>
      <td><code>voice</code></td>
      <td> The voice to use for this language. </td>

      <td />

      <td>-</td>
    </tr>

    <tr>
      <td><code>transcriptionProvider</code></td>
      <td> The speech-to-text provider to use for this language (e.g., `google`, `telnyx`, `deepgram`). </td>

      <td />

      <td>-</td>
    </tr>

    <tr>
      <td><code>speechModel</code></td>
      <td> The speech recognition model to use for this language (e.g., `nova-2`). </td>

      <td />

      <td>-</td>
    </tr>
  </tbody>
</table>

## Parameter Attributes

<table>
  <thead>
    <tr>
      <th>ATTRIBUTE</th>
      <th>DESCRIPTION</th>
      <th>OPTIONS</th>
      <th>DEFAULT</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td><code>name</code></td>
      <td> The name of the custom parameter. </td>

      <td />

      <td>-</td>
    </tr>

    <tr>
      <td><code>value</code></td>
      <td> The value of the custom parameter. </td>

      <td />

      <td>-</td>
    </tr>
  </tbody>
</table>

## Examples

### Basic usage with greeting and voice

```xml theme={null}
<Response>
  <Connect>
    <ConversationRelay
      url="wss://myapp.example.com/ws"
      voice="Telnyx.Natural.abbie"
      language="en"
      transcriptionProvider="deepgram"
      welcomeGreeting="Hello! How can I help you today?"
    />
  </Connect>
</Response>
```

### Multilingual with DTMF language selection

```xml theme={null}
<Response>
  <Connect>
    <ConversationRelay
      url="wss://myapp.example.com/ws"
      voice="Telnyx.Natural.abbie"
      language="en"
      transcriptionProvider="deepgram"
      welcomeGreeting="Hello! I am your multilingual assistant. Press 1 for English, 2 for French, 3 for Spanish."
      welcomeGreetingInterruptible="any"
      interruptible="any"
      dtmfDetection="true"
    >
      <Language code="fr" voice="Telnyx.NaturalHD.astra" transcriptionProvider="google" />
      <Language code="es" voice="Telnyx.NaturalHD.albion" transcriptionProvider="telnyx" />
    </ConversationRelay>
  </Connect>
</Response>
```

### Custom parameters

Custom parameters are passed to the WebSocket server as assistant dynamic variables.

```xml theme={null}
<Response>
  <Connect>
    <ConversationRelay
      url="wss://myapp.example.com/ws"
      voice="Telnyx.Natural.abbie"
      language="en"
      transcriptionProvider="deepgram"
      welcomeGreeting="Hi there!"
    >
      <Parameter name="customer_id" value="12345" />
      <Parameter name="agent_mode" value="support" />
    </ConversationRelay>
  </Connect>
</Response>
```

### Non-interruptible greeting

Use `welcomeGreetingInterruptible="none"` to ensure the greeting plays fully before accepting input.

```xml theme={null}
<Response>
  <Connect>
    <ConversationRelay
      url="wss://myapp.example.com/ws"
      voice="Telnyx.Natural.abbie"
      language="en"
      transcriptionProvider="deepgram"
      welcomeGreeting="Please listen to this important message."
      welcomeGreetingInterruptible="none"
      interruptible="speech"
    />
  </Connect>
</Response>
```
