phoneme

fun phoneme(content: String, ipa: String)

Provides exact phonetic pronunciation using the International Phonetic Alphabet (IPA).

Generates an SSML <phoneme alphabet="ipa" ph="...">...</phoneme> element.

tts.speak {
text("Le mot ")
phoneme("Huawei", "wa.wɛj")
text(" est chinois.")
}

Parameters

content

The original text (displayed but overridden by phonetics).

ipa

The IPA transcription the TTS engine uses for pronunciation.