add Pronunciation
Adds a pronunciation rule to the dictionary.
Each word can only have one active rule. Adding a new rule for the same word replaces the previous one, preventing conflicts between alias and IPA.
Matching is case-insensitive.
// Simple alias — TTS reads "Oua-ouei"
tts.addPronunciation(PronunciationRule.Alias("Huawei", "Oua-ouei"))
// IPA — exact phonetic control
tts.addPronunciation(PronunciationRule.Ipa("Lacoste", "la.kɔst"))
// Replaces the alias with IPA for the same word
tts.addPronunciation(PronunciationRule.Ipa("Huawei", "wa.wɛj"))Content copied to clipboard
Return
This instance for chaining.
Parameters
rule
The PronunciationRule to add (either PronunciationRule.Alias or PronunciationRule.Ipa).