> ## 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.

# Gather

The `<Gather>` verb collects DTMF tones during a call. `<Say>` can be nested within `<Gather>` to create an interactive IVR with text-to-speech.

## Attributes

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

  <tbody>
    <tr>
      <td><code>action</code></td>
      <td> URL where TeXML will send the gathered result and message history. Same method (<code>GET</code>/<code>POST</code>) as set for the TexML application is used. Transfers control of the current call to the TeXML file returned. </td>

      <td />

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

    <tr>
      <td><code>timeout</code></td>
      <td> Time in seconds between digits before the `<Gather>` digits are sent to your action URL. Telnyx will wait until all nested verbs have been executed before beginning the timeout period. </td>
      <td><code>1</code> - <code>120</code></td>
      <td><code>5</code></td>
    </tr>

    <tr>
      <td><code>input</code></td>
      <td> The input type for the gather action. </td>
      <td><code>dtmf</code>, <code>speech</code>, <code>dtmf speech</code></td>
      <td><code>dtmf</code></td>
    </tr>

    <tr>
      <td><code>speechTimeout</code></td>
      <td> Time in seconds to wait after speech ends before timing out. </td>

      <td />

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

    <tr>
      <td><code>partialResultCallback</code></td>
      <td> URL for sending partial gather results. </td>

      <td />

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

    <tr>
      <td><code>partialResultCallbackMethod</code></td>
      <td> HTTP request type used for partialResultCallback. </td>
      <td><code>GET</code>, <code>POST</code></td>
      <td><code>POST</code></td>
    </tr>

    <tr>
      <td><code>profanityFilter</code></td>
      <td> Whether to filter profanity from speech recognition results (camelCase format). </td>

      <td />

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

    <tr>
      <td><code>useEnhanced</code></td>
      <td> Enables enhanced transcription, this works for models phone\_call and video (camelCase format). </td>

      <td />

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

    <tr>
      <td><code>hints</code></td>
      <td> Hints to improve transcription accuracy. On Deepgram, this maps to the Nova-2 keyword biasing feature and is supported only on `model="deepgram/nova-2"`; it is silently dropped on Nova-3 (use `keyterms` instead). Accepts a comma-separated string. </td>

      <td />

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

    <tr>
      <td><code>keyterms</code></td>
      <td> Deepgram Nova-3 keyterm prompting. Biases recognition toward domain-specific terms or brand names. Supported only on `model="deepgram/nova-3"`; silently dropped on Nova-2 (use `hints` instead). Accepts a comma-separated string. </td>

      <td />

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

    <tr>
      <td><code>smartFormat</code></td>
      <td> Disable Deepgram's smart formatting so the transcript stays lowercase with no punctuation. Deepgram-only; silently dropped on other engines. </td>

      <td />

      <td><code>true</code></td>
    </tr>

    <tr>
      <td><code>transcriptionEngine</code></td>
      <td> Engine to use for speech recognition: Google, Telnyx, Azure, Deepgram, xAI, AssemblyAI, Soniox, Speechmatics </td>
      <td><code>Google</code>, <code>Telnyx</code>, <code>Azure</code>, <code>Deepgram</code>, <code>xAI</code>, <code>AssemblyAI</code>, <code>Soniox</code>, <code>Speechmatics</code></td>
      <td>-</td>
    </tr>

    <tr>
      <td><code>model</code></td>
      <td> Speech recognition model. Format is `vendor/model-name` — e.g. `deepgram/nova-2`, `deepgram/nova-3`, `azure/fast`, `assemblyai/universal-streaming`, `soniox/stt-rt-v4`, `speechmatics/standard`, `xai/grok-stt`. The vendor must match `transcriptionEngine`. On Deepgram, defaults to `deepgram/nova-3` when unset. </td>

      <td />

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

    <tr>
      <td><code>apiKeyRef</code></td>
      <td> Reference to the API key for authentication. See [integration secrets documentation](/api-reference/integration-secrets/create-a-secret) for details. The parameter is optional as defaults are available for some regions. Used with Azure transcriptionEngine. </td>

      <td />

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

    <tr>
      <td><code>region</code></td>
      <td> Region to use with the specified transcription engine. Required for Azure. See regions in [transcription\_engine\_config](/api-reference/call-commands/transcription-start). </td>

      <td />

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

    <tr>
      <td><code>finishOnKey</code></td>
      <td> The set of digits, (0-9, \*, #), that indicates the end of the gather. </td>

      <td />

      <td><code>#</code></td>
    </tr>

    <tr>
      <td><code>numDigits</code></td>
      <td> The number of digits to be gathered. </td>

      <td />

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

    <tr>
      <td><code>language</code></td>
      <td> The language used. See <a href="/api-reference/call-commands/speak-text">RESTful API documentation</a> for supported values. By default en-US. </td>

      <td />

      <td><code>en-US</code></td>
    </tr>

    <tr>
      <td><code>validDigits</code></td>
      <td> The set of valid digits for the gather action. </td>

      <td />

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

    <tr>
      <td><code>invalidDigitsAction</code></td>
      <td> URL where TeXML will send the invalid gathered digits. The same method (GET/POST) as set for the TeXML application is used. Transfers control of the current call to the TeXML file returned. </td>

      <td />

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

    <tr>
      <td><code>minDigits</code></td>
      <td> Minimum number of digits to be gathered. </td>
      <td><code>1</code> - <code>128</code></td>
      <td><code>1</code></td>
    </tr>

    <tr>
      <td><code>maxDigits</code></td>
      <td> Maximum number of digits to be gathered. </td>
      <td><code>1</code> - <code>128</code></td>
      <td><code>128</code></td>
    </tr>
  </tbody>
</table>

## Child verbs/nouns

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

  <tbody>
    <tr>
      <td><code>Say</code></td>

      <td />
    </tr>

    <tr>
      <td><code>Play</code></td>

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

## Examples

```xml theme={null}
<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <Gather timeout="5" numDigits="1" finishOnKey="#">
        <Say>Press 1 for sales, press 2 for support.</Say>
    </Gather>
</Response>
```

## Expected callbacks

If `action` is set, a callback is sent when gather completes with the collected digits or speech.

See [Gather Callback](/api-reference/callbacks/texml-gather) for the full payload reference.
