{"slug": "making-open-source-text-to-speech-sound-right-ranked-voices-text-normalization", "title": "Making open-source text to speech sound right: ranked voices, text normalization and one engine for Python and the browser", "summary": "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.", "body_md": "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.\n\nPiper 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:\n\nIn 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.\n\nPiper 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/](https://loudness.ai/research/piper-tts-text-normalization/)\n\nEvery 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.\n\nThe 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.\n\n```\npip install loudness-tts\nloudness-tts \"Dr. Smith paid $5.50 on 4/5/2026.\" -o speech.wav --srt speech.srt\n```\n\nFor 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/](https://loudness.ai/developers/guides/)\n\nTry it without installing anything: [https://huggingface.co/spaces/Loudness-ai/text-to-speech-browser](https://huggingface.co/spaces/Loudness-ai/text-to-speech-browser)\n\nCode: [https://github.com/Loudness-ai/loudness-tts](https://github.com/Loudness-ai/loudness-tts)\n\nWhat's next: reading rules for more languages, and npm. Issues and pull requests are welcome.", "url": "https://wpnews.pro/news/making-open-source-text-to-speech-sound-right-ranked-voices-text-normalization", "canonical_source": "https://dev.to/secretheart49/making-open-source-text-to-speech-sound-right-ranked-voices-text-normalization-and-one-engine-for-3oia", "published_at": "2026-10-16 07:58:38+00:00", "updated_at": "2026-10-16 08:09:28.795558+00:00", "lang": "en", "topics": ["ai-tools", "natural-language-processing", "developer-tools", "ai-products"], "entities": ["Loudness.ai", "loudness-tts", "Piper", "espeak-ng", "onnxruntime-web", "Whisper large-v3", "Open WebUI", "LibreChat"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/making-open-source-text-to-speech-sound-right-ranked-voices-text-normalization", "markdown": "https://wpnews.pro/news/making-open-source-text-to-speech-sound-right-ranked-voices-text-normalization.md", "text": "https://wpnews.pro/news/making-open-source-text-to-speech-sound-right-ranked-voices-text-normalization.txt", "jsonld": "https://wpnews.pro/news/making-open-source-text-to-speech-sound-right-ranked-voices-text-normalization.jsonld"}}