> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.vapi.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.vapi.ai/_mcp/server.

# Gradium

> Connect the Gradium text-to-speech API to Vapi through a custom voice endpoint.

[Gradium](https://gradium.ai) builds real-time audio models, including streaming text-to-speech with instant voice cloning. You connect it through a [custom voice](/customization/custom-voices/custom-tts) endpoint: a small server that receives the text Vapi wants spoken and streams raw PCM back.

> **Note**
>
> A Gradium account and API key are required.

#### Build the endpoint

Gradium's [Vapi integration guide](https://docs.gradium.ai/integrations/agent-frameworks/vapi) has the complete endpoint, including the SDK setup and streaming loop.

Read `message.sampleRate` on each request and synthesize at that rate. Vapi expects raw 16-bit little-endian mono PCM at exactly the rate it asked for, streamed as it is produced.

#### Point your assistant at it

Host the endpoint somewhere Vapi can reach over HTTPS, then reference it
with a [custom credential](/server-url/server-authentication) so Vapi can
authenticate to it:

```json
{
  "voice": {
    "provider": "custom-voice",
    "server": {
      "url": "https://your-server.com/vapi/tts",
      "credentialId": "cred_tts_auth_123"
    }
  }
}
```

Start a call and your assistant speaks with your Gradium voice.

## Troubleshooting

| Symptom                                        | Fix                                                                                                                                     |
| ---------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| Audio plays at the wrong speed or pitch        | Synthesize at the rate in `message.sampleRate`, and return mono 16-bit little-endian PCM with no WAV header                             |
| Voice or pronunciation edits don't take effect | Vapi caches custom voice audio. Set `"cachingEnabled": false` on the `voice` object while iterating                                     |
| Long pause before the first word               | A new connection per sentence. Pool them as shown in [Gradium's Vapi guide](https://docs.gradium.ai/integrations/agent-frameworks/vapi) |

## Related

#### [Gradium Vapi guide](https://docs.gradium.ai/integrations/agent-frameworks/vapi)

The full endpoint, tuning, and configuration reference.

#### [Gradium speech-to-text](/customization/custom-transcriber/gradium)

Use Gradium as a custom transcriber.