Pronunciation Rule
Type-safe pronunciation rule for the BetterFrenchTts dictionary.
Each rule maps a word to either a simple text alias or an exact IPA transcription. A single word can only have one active rule — adding a new rule for the same word replaces the previous one, preventing silent conflicts.
Usage
// Simple alias — the TTS reads "Oua-ouei" instead of "Huawei"
tts.addPronunciation(PronunciationRule.Alias("Huawei", "Oua-ouei"))
// IPA — exact phonetic control
tts.addPronunciation(PronunciationRule.Ipa("Huawei", "wa.wɛj"))Content copied to clipboard