Making open-source text to speech sound right: ranked voices, text normalization and one engine for Python and the browser
Open text-to-speech models have become small and fast enough to run anywhere. Piper voices run faster than real time on a laptop CPU. But when we built the text-to-speech tool on Loudness.ai, three problems stood between "it runs" and "it sounds right". loudness-tts is what we built to solve them, and it is free and open source. 1. Which voice? Piper has more than 170 voice files, some with…
Open-source text-to-speech models have become powerful enough to run on various platforms. While Piper voices are faster than real-time on a laptop CPU, three issues hindered their naturalness. Loudness.ai's loudness-tts tool addresses these problems and is open source.
Researchers tested every voice to find those suitable for commercial use. They evaluated 1,683 voices based on naturalness (using UTMOS22) and clarity (measuring character error rate with Whisper large-v3). The study, dataset, and voice explorer are publicly available.
loudness-tts normalizes text to sound like a human would read it. It converts currency, dates, times, units, phone numbers, ranges, fractions, abbreviations, and Roman numerals into words. The tool also aligns speech with the text, enabling word highlighting and subtitles. Loudness-normalization ensures the output follows industry standards, with -16 LUFS and true peak below -1.5 dBTP. The system generates precise SRT and VTT subtitles with fades between speech and silence to prevent clicks.
The Python package is compatible with standard installations, while the JavaScript edition works in Node, Bun, Deno, and the browser. A compiled espeak-ng WebAssembly runs within onnxruntime-web, and text rules are ported from Python to JavaScript. Parity tests confirm both editions deliver the same results across 8,609 text cases and 78 voice models.
loudness-tts offers an OpenAI-compatible server for chat applications, along with guides for popular open-source chat platforms. Users can test the tool online without installation. The source code is available on GitHub, and the developers welcome issues and pull requests to improve the tool further.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.