- Brand names, product names, or proper nouns
- Technical terms or acronyms
- Words that should be pronounced differently than their standard pronunciation
- Non-English words in English text (or vice versa)
How Pronunciation Dictionaries Work
A pronunciation dictionary is a collection of word-pronunciation pairs that you create and manage through the Waves API. Each dictionary has a unique ID that you can reference in your TTS requests to ensure consistent pronunciation across your applications.Key Concepts
- Word: The text that appears in your input
- Pronunciation: The way the word is written out in normal words to show how it sounds (not IPA)
- Dictionary ID: A unique identifier for your pronunciation dictionary that you use in TTS requests
Creating a Pronunciation Dictionary
Step 1: Create Your Dictionary
First, create a pronunciation dictionary with your custom word-pronunciation pairs:Step 2: Save the Dictionary ID
Important: Save the returnedid
from the response. You’ll need this ID to reference your pronunciation dictionary in TTS requests and for future updates or deletions.
Managing Your Pronunciation Dictionaries
List All Dictionaries
Retrieve all your pronunciation dictionaries:Update a Dictionary
Modify an existing pronunciation dictionary:Delete a Dictionary
Remove a pronunciation dictionary:Using Pronunciation Dictionaries in TTS Requests
Once you have created a pronunciation dictionary and obtained its ID, you can use it in your TTS requests by including thepronunciation_dicts
parameter. This parameter accepts an array of dictionary IDs, allowing you to use multiple pronunciation dictionaries in a single request:
Lightning Model Example
Lightning Large Model Example
Using Multiple Dictionaries
You can also use multiple pronunciation dictionaries in a single request by providing an array of dictionary IDs:Complete Workflow Example
Here’s a complete example showing the full workflow from creating a dictionary to using it in synthesis:Tips for Creating Pronunciations
-
Break down complex words: For multi-syllable words, separate syllables with hyphens
- “Kubernetes” → “koo-ber-net-ees”
-
Spell it how it sounds: Write words the way you want them spoken, even if it’s not standard spelling
- “SQL” → “sequel”
- “API” → “ay-pee-eye”
- Stay consistent: Use the same style across your dictionary (e.g., always use hyphens for syllables).
- Test and refine: Generate a small dictionary first, test the pronunciations, and adjust until they sound natural.
Best Practices
Dictionary Management
- Keep dictionaries focused: Create separate dictionaries for different domains (e.g., one for technical terms, another for product names).
- Combine multiple dictionaries: Use the array format to apply multiple pronunciation dictionaries in a single TTS request.
- Update regularly: Add or refine pronunciations as your vocabulary grows.
Pronunciation Quality
- Verify pronunciations: Listen to the output to confirm it matches expectations.
- Consider context: Some words may have multiple valid pronunciations—pick the one that makes sense for your use case.
- Language consistency: Ensure pronunciations match the language setting of your TTS requests.
Performance Considerations
- Cache dictionary IDs: Store dictionary IDs in your application to avoid repeated API calls.
- Batch updates: When possible, update multiple pronunciations in a single API call.
- Monitor usage: Track which dictionaries are actively used in production.
Troubleshooting
Common Issues
Dictionary not found- Make sure you’re using the correct dictionary ID and that the dictionary hasn’t been deleted.
- Verify that the dictionary ID is included in your TTS request.
- Ensure the words in your text match exactly (case-sensitive) with your dictionary entries.
- Confirm the pronunciation is written in plain text (not IPA).
- Simplify your spelling.
- Test with shorter words first and adjust gradually.
Error Responses
The API will return specific error messages for common issues:Next Steps
- Explore the API Reference for detailed parameter information
- Check out TTS Best Practices for optimization tips
- Learn about Voice Cloning to create custom voices