Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions fern/customization/custom-tts/gandr.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
title: Gandr
subtitle: Use Gandr text to speech as a custom voice in Vapi
description: Connect the Gandr text to speech API to Vapi through a custom voice endpoint, hosted by Gandr or deployed on your own server.
slug: customization/custom-tts/gandr
---

[Gandr](https://gandr.ai) is a text to speech API built for voice agents. It reads numbers, order IDs and addresses correctly, one engine speaks 23 languages with six voices, every render carries an inaudible watermark, and audio streams back as it is generated. You connect it through a [custom voice](/customization/custom-voices/custom-tts) endpoint. Gandr hosts one for you at `https://tts.gandr.ai/v1/vapi`, and there is a small adapter you can deploy yourself if you want the TTS hop on a server you control.

<Note>A Gandr account and API key are required.</Note>

<Steps>
<Step title="Choose the endpoint">
**Hosted:** `https://tts.gandr.ai/v1/vapi` already implements the custom voice contract. It reads the nested `message` envelope, synthesizes at the requested `message.sampleRate` (8000, 16000, 22050, 24000 or 44100) and streams raw 16-bit little-endian mono PCM back.

**Self-hosted:** deploy the adapter at [github.com/Gandr-AI/gandr-vapi](https://github.com/Gandr-AI/gandr-vapi). It calls Gandr's OpenAI-compatible speech endpoint and implements the same contract, so the assistant config is identical apart from the URL.
</Step>
<Step title="Point your assistant at it">
Store your Gandr key in a [custom credential](/server-url/server-authentication) so it never travels in the assistant config, then reference it:

```json
{
"voice": {
"provider": "custom-voice",
"server": {
"url": "https://tts.gandr.ai/v1/vapi",
"credentialId": "<your-custom-credential-id>",
"timeoutSeconds": 10
}
}
}
```

Start a call and your assistant speaks with a Gandr voice. The stock voices are `gandr-ava`, `gandr-dane`, `gandr-jenny`, `gandr-leo`, `gandr-lewis` and `gandr-mia`, and any of the 23 languages can be set per request, independent of the voice.
</Step>
</Steps>

## Troubleshooting

| Symptom | Fix |
| --- | --- |
| Audio plays at the wrong speed or pitch | Vapi expects mono 16-bit little-endian PCM at exactly `message.sampleRate`, with no WAV header. The hosted endpoint does this; if you run the adapter, check that it passes the requested rate through |
| Voice or pronunciation edits don't take effect | Vapi caches custom voice audio. Set `"cachingEnabled": false` on the `voice` object while iterating |
| The call times out | Check that the Gandr key in the custom credential is active and that the endpoint URL answers over HTTPS |

## Related

<CardGroup cols={2}>
<Card title="Gandr custom voice guide" icon="book" href="/customization/custom-voices/gandr">
The step by step dashboard setup for the hosted endpoint.
</Card>
<Card title="Gandr API reference" icon="code" href="https://gandr.ai/docs">
Voices, languages, formats and the OpenAI-compatible speech endpoint.
</Card>
</CardGroup>
4 changes: 2 additions & 2 deletions fern/customization/custom-voices/gandr.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ description: Wire Gandr, a text to speech API for voice agents, into Vapi with t
slug: customization/custom-voices/gandr
---

Gandr is a text to speech API built for voice agents. It reads numbers, dates, order IDs and addresses correctly, one engine speaks 23 languages with six voices, and every render carries an inaudible watermark. Audio streams back as it is generated.
Gandr is a text to speech API built for voice agents. It reads numbers, order IDs and addresses correctly, one engine speaks 23 languages with six voices, and every render carries an inaudible watermark. Audio streams back as it is generated.

Gandr's `/v1/vapi` endpoint implements the custom-voice contract described in the [Custom TTS guide](/customization/custom-voices/custom-tts): it reads the nested `message` envelope, honours the requested `sampleRate` (8000, 16000, 22050, 24000 or 44100), and returns raw 16-bit little-endian mono PCM.
Gandr's `/v1/vapi` endpoint implements the custom-voice contract described in the [Custom TTS guide](/customization/custom-voices/custom-tts): it reads the nested `message` envelope, honours the requested `sampleRate` (8000, 16000, 22050, 24000 or 44100), and returns raw 16-bit little-endian mono PCM. To run the TTS hop on a server you control instead, deploy the small adapter at [github.com/Gandr-AI/gandr-vapi](https://github.com/Gandr-AI/gandr-vapi); it calls Gandr's OpenAI-compatible speech endpoint and implements this same contract.

<Note>A Gandr account and API key are required.</Note>

Expand Down
2 changes: 2 additions & 0 deletions fern/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,8 @@ navigation:
contents:
- page: Gradium
path: customization/custom-tts/gradium.mdx
- page: Gandr
path: customization/custom-tts/gandr.mdx
- section: Custom LLMs
icon: fa-light fa-brain-circuit
contents:
Expand Down
Loading