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

# Deepgram

> Use Deepgram speech-to-text in WednesdayAI for inbound audio and voice note transcription.

# Deepgram

Deepgram is a speech-to-text API. In WednesdayAI it is used for **inbound audio and voice note transcription** via `tools.media.audio`. When enabled, WednesdayAI uploads audio files to Deepgram and injects the transcript into the reply pipeline.

<Note>
  Deepgram is a **transcription provider**, not a text generation model. It cannot be used as a primary or fallback model. Configure it under `tools.media.audio`, not under `models.providers`.
</Note>

## Prerequisites

* A Deepgram account and API key from [deepgram.com](https://deepgram.com)

## Quick setup

### 1. Get an API key

Sign in to [console.deepgram.com](https://console.deepgram.com) and create an API key. Keys start with `Token dg_`.

Store it on the gateway host:

```bash theme={"dark"}
echo 'DEEPGRAM_API_KEY=dg_...' >> ~/.openclaw/.env
```

### 2. Enable audio transcription

```json5 theme={"dark"}
{
  tools: {
    media: {
      audio: {
        enabled: true,
        models: [{ provider: "deepgram", model: "nova-3" }],
      },
    },
  },
}
```

## Configuration options

| Option                                     | Default  | Notes                               |
| ------------------------------------------ | -------- | ----------------------------------- |
| `model`                                    | `nova-3` | Deepgram model ID                   |
| `language`                                 | (auto)   | Language hint, e.g. `"en"`          |
| `providerOptions.deepgram.detect_language` | false    | Enable automatic language detection |
| `providerOptions.deepgram.punctuate`       | false    | Add punctuation to transcript       |
| `providerOptions.deepgram.smart_format`    | false    | Apply smart formatting              |

### With language hint

```json5 theme={"dark"}
{
  tools: {
    media: {
      audio: {
        enabled: true,
        models: [{ provider: "deepgram", model: "nova-3", language: "en" }],
      },
    },
  },
}
```

### With Deepgram options

```json5 theme={"dark"}
{
  tools: {
    media: {
      audio: {
        enabled: true,
        providerOptions: {
          deepgram: {
            detect_language: true,
            punctuate: true,
            smart_format: true,
          },
        },
        models: [{ provider: "deepgram", model: "nova-3" }],
      },
    },
  },
}
```

### Using a proxy

Override the endpoint and headers when routing through a proxy:

```json5 theme={"dark"}
{
  tools: {
    media: {
      audio: {
        enabled: true,
        baseUrl: "https://your-proxy/deepgram",
        headers: { "X-Custom-Header": "value" },
        models: [{ provider: "deepgram", model: "nova-3" }],
      },
    },
  },
}
```

## Provider settings

| Setting      | Value                                            |
| ------------ | ------------------------------------------------ |
| Provider ID  | `deepgram`                                       |
| Auth env var | `DEEPGRAM_API_KEY`                               |
| Use case     | Pre-recorded audio transcription (not streaming) |

## Troubleshooting

<AccordionGroup>
  <Accordion title="401 Unauthorized">
    Verify `DEEPGRAM_API_KEY` is set correctly in `~/.openclaw/.env` and the key is active in the Deepgram console.
  </Accordion>

  <Accordion title="Audio file rejected">
    Check file size limits and supported formats in the [Deepgram documentation](https://developers.deepgram.com). WednesdayAI applies its own audio size caps before sending to Deepgram.
  </Accordion>

  <Accordion title="Transcript not injected">
    Ensure `tools.media.audio.enabled` is `true` and the `deepgram` provider is listed in `models`.
  </Accordion>
</AccordionGroup>

## Related

* [AI providers overview](/admin/providers/index)
* [Reference: config](/reference/config)
