diff --git a/fern/customization/custom-transcriber/gradium.mdx b/fern/customization/custom-transcriber/gradium.mdx new file mode 100644 index 000000000..02c6618de --- /dev/null +++ b/fern/customization/custom-transcriber/gradium.mdx @@ -0,0 +1,57 @@ +--- +title: Gradium +subtitle: Use Gradium speech-to-text as a custom transcriber in Vapi +description: Stream Vapi call audio to Gradium's real-time speech-to-text over a WebSocket bridge. +slug: customization/custom-transcriber/gradium +--- + +[Gradium](https://gradium.ai) builds real-time audio models, including streaming speech-to-text with semantic voice activity detection. You can connect it through a [custom transcriber](/customization/custom-transcriber) endpoint: a small WebSocket bridge that forwards call audio to Gradium and returns transcripts to Vapi. + +A Gradium account and API key are required. + + + + Gradium's [Vapi integration guide](https://docs.gradium.ai/integrations/agent-frameworks/vapi) has the complete bridge, including end-of-turn detection and reconnecting on long calls. + + Two things matter most: forward **only channel 0** of the interleaved audio, or the agent transcribes its own speech; and send `partial` transcripts as well as `final` ones, which Vapi needs for barge-in. + + + Host the bridge somewhere Vapi can reach over `wss`, then reference it with + a [custom credential](/server-url/server-authentication) so Vapi can + authenticate to it: + + ```json + { + "transcriber": { + "provider": "custom-transcriber", + "server": { + "url": "wss://your-server.com/vapi/transcriber", + "credentialId": "cred_transcriber_auth_123" + } + } + } + ``` + + Start a call and your assistant transcribes with Gradium. + + + +## Troubleshooting + +| Symptom | Fix | +| --- | --- | +| The agent transcribes its own speech | Both channels are being forwarded. Send only channel 0 from the interleaved PCM | +| Turns get swallowed, barge-in stops working | Send `partial` transcripts as well as `final` | +| Final transcripts lose the last word or two | Finalize on Gradium's flush acknowledgement, not on the VAD threshold crossing. See [Gradium's Vapi guide](https://docs.gradium.ai/integrations/agent-frameworks/vapi) | +| The assistant replies before the caller finishes | Vapi's endpointing is racing Gradium's VAD. Tune [start and stop speaking plans](/customization/voice-pipeline-configuration), or hand the decision to Gradium with a [custom endpointing model](https://docs.gradium.ai/integrations/agent-frameworks/vapi) | + +## Related + + + + The full bridge, tuning, and configuration reference. + + + Use Gradium voices as a custom voice. + + diff --git a/fern/customization/custom-tts/gradium.mdx b/fern/customization/custom-tts/gradium.mdx new file mode 100644 index 000000000..1db0ec544 --- /dev/null +++ b/fern/customization/custom-tts/gradium.mdx @@ -0,0 +1,56 @@ +--- +title: Gradium +subtitle: Use Gradium text-to-speech as a custom voice in Vapi +description: Connect the Gradium text-to-speech API to Vapi through a custom voice endpoint. +slug: customization/custom-tts/gradium +--- + +[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. + +A Gradium account and API key are required. + + + + 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. + + + 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 + + + + The full endpoint, tuning, and configuration reference. + + + Use Gradium as a custom transcriber. + + diff --git a/fern/docs.yml b/fern/docs.yml index 8f85be843..10882dad3 100644 --- a/fern/docs.yml +++ b/fern/docs.yml @@ -289,12 +289,18 @@ navigation: path: customization/custom-voices/cartesia.mdx - page: Gandr path: customization/custom-voices/gandr.mdx - - page: Custom transcriber + - section: Custom transcriber path: customization/custom-transcriber.mdx icon: fa-light fa-microphone - - page: Custom TTS + contents: + - page: Gradium + path: customization/custom-transcriber/gradium.mdx + - section: Custom TTS path: customization/custom-tts.mdx icon: fa-light fa-volume-high + contents: + - page: Gradium + path: customization/custom-tts/gradium.mdx - section: Custom LLMs icon: fa-light fa-brain-circuit contents: