Building the Language Intelligence

How VoiceLK processes mixed Sinhala–English text using custom pronunciation rules, language routing, and a technical-term lexicon.

T.H. Mihiran Thilakarathna

VoiceLK – Building the Language Intelligence

Building the Language Intelligence

Developing the pronunciation rules and language-processing components that help VoiceLK understand Sinhala–English code-switched text.

A major challenge in building VoiceLK was handling Sinhala and English words within the same sentence. Standard text-processing methods are not always sufficient when a sentence contains English technical terms written alongside Sinhala text.

To address this challenge, we developed a custom language-processing pipeline that combines text normalisation, language routing, and grapheme-to-phoneme (G2P) conversion.

Text normalisation prepares the input before speech generation. It handles elements such as numbers, dates, units, URLs, IP addresses, version numbers, and symbols so that they can be converted into more suitable spoken forms.

The next component focuses on pronunciation. Our system uses Sinhala-specific pronunciation rules, including support for prenasalised consonants and schwa handling. For English words, it uses a technical-term lexicon, acronym handling, CMU pronunciation information, and letter-to-sound fallback methods when needed.

We also created a shared phoneme inventory containing 54 phonemes to support the Sinhala and English pronunciation pathways within a consistent processing pipeline. Our technical-term lexicon contains 767 entries: 659 English entries and 108 Sinhala entries.

These components help VoiceLK process mixed-language input before passing the resulting phoneme sequence to the neural speech synthesis model.

Building this language intelligence was an important step towards making technical explanations clearer and more accessible to Sinhala-speaking learners.

The key lesson was that natural speech generation begins long before the audio is produced—with the way text is interpreted and pronunciation is prepared.