Larynx will mispronounce a word if the IPA passed is not space-separated — for example, tomato will be incorrectly shortened if the IPA passed is təmˈɑtoʊ, but will be correctly pronounced if it's space-separated (i.e. t ə m ˈɑ t oʊ)...
Additionally, Larynx will accept a SSML non-compliant (but slightly simpler) payload, as given below:
<?xml version="1.0"?> <speak version="1.1" xmlns="http://www.w3.org/2001/10/synthesis" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3.org/2001/10/synthesis http://www.w3.org/TR/speech-synthesis11/synthesis.xsd" xml:lang="{language code}"> <lexicon> <lexeme> <grapheme> {word} </grapheme> <phoneme> {space seperated IPA} </phoneme> </lexeme> </lexicon> <w>{word}</w> </speak>
for example:
<?xml version="1.0"?> <speak version="1.1" xmlns="http://www.w3.org/2001/10/synthesis" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3.org/2001/10/synthesis http://www.w3.org/TR/speech-synthesis11/synthesis.xsd" xml:lang="en-US"> <lexicon> <lexeme> <grapheme> tomato </grapheme> <phoneme> t ə m ˈɑ t oʊ </phoneme> </lexeme> </lexicon> <w>tomato</w> </speak>
Action items
- Update the Larynx engine to space-separate the IPA prior to inserting into the SSML.
- Possibly trim down the Larynx engine SSML generation to the smaller, non-compliant example format.
- Possibly investigate if this makes a significant difference to the quality of the returned pronunciations — this is really only useful for T317274: Use free software implementation for Phonos on Wikimedia sites