Control how specific words are spoken using custom pronunciation dictionaries. Useful for names, acronyms, technical terms, and brand names.
- Create a pronunciation dictionary with custom word–pronunciation pairs
- Use the dictionary when generating speech
- List, update, and delete dictionaries
- Compare output with and without custom pronunciation
Base dependencies are installed via the root
requirements.txt. See the main README for setup. AddSMALLEST_API_KEYto your.env.
Create a dictionary, synthesize speech with it, then clean up:
uv run python/pronunciation.pynode javascript/pronunciation.js- Create a pronunciation dictionary with word–pronunciation pairs
- Synthesize speech, passing the dictionary ID in
pronunciation_dicts - The TTS engine uses your custom pronunciations instead of defaults
- Clean up by deleting the dictionary when no longer needed
| Word | Pronunciation | Use Case |
|---|---|---|
API |
ay pee eye |
Acronyms |
GIF |
jiff |
Contested pronunciations |
Kubernetes |
koo-ber-net-eez |
Technical terms |
Diya |
dee-yah |
Names |
- Getting Started — Basic speech synthesis
- Voices — Choose the right voice for your use case