Gradium

Use Gradium text-to-speech as a custom voice in Vapi

Gradium builds real-time audio models, including streaming text-to-speech with instant voice cloning. You connect it through a custom voice endpoint: a small server that receives the text Vapi wants spoken and streams raw PCM back.

A Gradium account and API key are required.
1

Build the endpoint

Gradium’s Vapi integration guide 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.

2

Point your assistant at it

Host the endpoint somewhere Vapi can reach over HTTPS, then reference it with a custom credential so Vapi can authenticate to it:

1{
2 "voice": {
3 "provider": "custom-voice",
4 "server": {
5 "url": "https://your-server.com/vapi/tts",
6 "credentialId": "cred_tts_auth_123"
7 }
8 }
9}

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

Troubleshooting

SymptomFix
Audio plays at the wrong speed or pitchSynthesize 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 effectVapi caches custom voice audio. Set "cachingEnabled": false on the voice object while iterating
Long pause before the first wordA new connection per sentence. Pool them as shown in Gradium’s Vapi guide