How it works
- You create a pronunciation dictionary with a set of rules
- Each rule maps a text (the word to match) to a pronunciation (how it should be spoken)
- You attach the dictionary to a PAL via the
pronunciation_dictionary_idfield in the TTS layer
Bring your own TTS API key
If you provide your own TTS API key, you can use Tavus pronunciation dictionaries the same way - just setpronunciation_dictionary_id on the TTS layer. Tavus will sync the dictionary rules to your provider account automatically.
Rule types
Each rule requires atype that determines how the pronunciation is interpreted:
Alias rules
Alias rules perform simple text substitution. The TTS engine speaks thepronunciation value instead of the original text.
IPA rules
IPA rules let you specify exact phonetic pronunciation. You can provide IPA in two formats:- Raw IPA: Standard IPA string (e.g.,
"hɛloʊ") - Pipe-delimited IPA: Pre-tokenized phonemes separated by
|(e.g.,"ˈ|b|ɑ|j|u")
Rule options
Each rule supports optional matching parameters:word_boundaries is only applied by ElevenLabs. When syncing to Cartesia, this option is ignored and the rule is applied without word-boundary matching.Attaching a dictionary to a PAL
Setpronunciation_dictionary_id in the TTS layer when creating or updating a PAL:
Each PAL supports one pronunciation dictionary at a time. Setting a new
pronunciation_dictionary_id replaces the previous one. Setting it to an empty string removes the dictionary.
