cd /news/ai-tools/making-open-source-text-to-speech-so… · home › topics › ai-tools › article
[ARTICLE · art-151215] src=dev.to ↗ pub= topic=ai-tools verified=true sentiment=↑ positive

Making open-source text to speech sound right: ranked voices, text normalization and one engine for Python and the browser

Loudness.ai released loudness-tts, an open-source text-to-speech tool that adds text normalization, ranked voice selection and loudness normalization on top of Piper voices. The team evaluated 1,683 commercially licensable voices for naturalness (UTMOS22) and clarity (Whisper large-v3 character error rate), and built a rule layer that converts money, dates, times, units, phone numbers, ranges, fractions, abbreviations and Roman numerals into spoken words in English and Spanish while keeping word-level alignment for subtitles. The project ships as a pip-installable Python package and a JavaScript edition that compiles espeak-ng to WebAssembly and runs voices on onnxruntime-web, with parity tests covering 8,609 text cases and 78 voice models.

by read2 min views4 publishedOct 16, 2026

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.

Piper has more than 170 voice files, some with hundreds of speakers. Their quality varies a lot, and many are licensed for non-commercial use only. We tested every one: 1,683 voices that a business may use, scored for naturalness (UTMOS22) and clarity (character error rate with Whisper large-v3). The full study, data and a voice explorer are public:

In loudness-tts, voice="auto" picks the best voice with a clear licence for your language, and every voice tells you the credit line its licence asks for.

Piper does no text normalization. "$5.50" becomes "dollar five point five zero", "4/5/2026" becomes "four slash five slash two thousand twenty-six", and "Dr. Smith" ends a sentence after "Dr.". loudness-tts runs a rule layer first: money, dates, times, units, phone numbers, ranges, fractions, abbreviations and Roman numerals become words, in English and Spanish. Every spoken word keeps a pointer to the text it came from, so subtitles and word highlighting stay aligned with what was written. We measured the effect on our own test suite and on an independent one: https://loudness.ai/research/piper-tts-text-normalization/

Every result is loudness-normalized to -16 LUFS with true peak at or below -1.5 dBTP, which suits podcasts and video. Word timings come from the model's own phoneme durations, so SRT and VTT subtitles are exact. Joins between speech and silence get short fades, so there are no clicks.

The Python edition is a normal package (pip install loudness-tts). The JavaScript edition had to give the same speech without Python, in Node, Bun, Deno and the browser. We compiled espeak-ng from the commit Piper uses to WebAssembly, ran the voices on onnxruntime-web, and ported the text rules line by line, with a small helper that gives JavaScript regular expressions Python's Unicode behaviour. Parity tests compare both editions on 8,609 text cases and all 78 voice models.

pip install loudness-tts
loudness-tts "Dr. Smith paid $5.50 on 4/5/2026." -o speech.wav --srt speech.srt

For chat apps there is an OpenAI-compatible server (loudness-tts serve, or the Docker image), with guides for Open WebUI, LibreChat and AnythingLLM: https://loudness.ai/developers/guides/

Try it without installing anything: https://huggingface.co/spaces/Loudness-ai/text-to-speech-browser

Code: https://github.com/Loudness-ai/loudness-tts

What's next: reading rules for more languages, and npm. Issues and pull requests are welcome.

── more in #ai-tools 4 stories · sorted by recency
── more on @loudness.ai 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/making-open-source-t…] indexed:0 read:2min 2026-10-16 · —