In T424378, we deployed v0 of the TTS prototype on Toolforge. The Apps team has been testing it and reported mispronunciation of unit abbreviations. For example, "3 m" is read as "three em" instead of "three meters", and "10 ft" is read as "ten eff tee" instead of "ten feet".
We need to improve the text normalization pipeline so that the following edge cases are pronounced correctly:
- Decimals: e.g. 3.14 -> "three point one four"
- Percentages: e.g. 50% -> "fifty percent"
- Temperature units: e.g. 3 °C -> "three degrees celsius", 4.2 °F -> "four point two degrees fahrenheit"
- Measurements: e.g. 1 kg -> "one kilogram", 10 kg -> "ten kilograms"
- Dates: e.g. 2025-01-15 -> "January fifteenth twenty twenty-five"
- Currency: e.g. $99.99 -> "ninety-nine dollars and ninety-nine cents"
- Ordinals: e.g. 1st -> "first", 2nd -> "second"
- Time: e.g. 3:30pm -> "three thirty PM"
- Abbreviations: e.g. "St." -> "Saint" or "Street" (disambiguated by context)
- Number ranges: e.g. 100–900 -> "one hundred to nine hundred"
- Compound units: e.g. m/s² -> "meters per second squared" (T426756#11944373)
- Subscript and Superscript characters: e.g. ₂, ² should be spoken as words (T426756#11944373)
- Orphaned punctuations (T426756#11966668)
- Custom/Wikipedia-specific terms: Domain vocabulary not handled by general-purpose text normalization
Using an established text normalization library will allow us to handle a broader range of these cases without rolling our custom regex rules for each edge case.