Install loudness-tts
Python or JavaScript on Windows, macOS and Linux, first speech with subtitles, the speech server, Docker and offline use.
Fast, natural text to speech on your own computer, server or web page, in Python and JavaScript. Free and open source, offline after the first voice download, with no account or API key.
Every open voice that allows commercial use, in 31 locales, scored for naturalness and clarity in our open study. The best voice for your language is picked automatically.
Prices, dates, times, units, phone numbers, abbreviations and Roman numerals become words in English and Spanish, with natural pauses.
Loudness set to −16 LUFS with true peak at or below −1.5 dBTP, exact word timings and SRT or VTT subtitles.
About 20 times faster than real time on a laptop, with the first sentence of a stream in under 0.2 seconds. No GPU.
The same speech from both editions: Python, plus Node.js, Bun, Deno and web browsers through WebAssembly.
A local speech server that apps such as Open WebUI, LibreChat and AnythingLLM can use instead of a paid service.
Use Python 3.9 or newer on Windows, macOS or Linux. The first run downloads the best voice for the language (about 80 MB, checked against its published checksum):
python3 -m venv .venv
source .venv/bin/activate
python -m pip install loudness-tts
loudness-tts "Dr. Smith paid $5.50 on 4/5/2026." -o speech.wav --srt speech.srtSpeak from Python, with subtitles and streaming:
import loudness_tts
loudness_tts.speak("The meeting starts at 9:30 AM.", "hello.wav")
speech = loudness_tts.synthesize("Llegamos el 15/10/2026.", language="es-ES")
speech.save("es.wav"); speech.save_srt("es.srt")
for chunk in loudness_tts.stream("A long text, read sentence by sentence."):
player.write(chunk.pcm())The JavaScript edition runs in Node.js 20 or newer, Bun, Deno and web browsers, with TypeScript types. Install the package file from the latest release on GitHub:
npm install https://github.com/Loudness-ai/loudness-tts/releases/download/v0.1.1/loudness-tts-0.1.1.tgzThen speak from Node.js, or from a web page with your bundler, where speak(text) plays the speech:
import { speak, synthesize } from "loudness-tts";
await speak("Hello! The meeting starts at 9:30 AM.", "hello.wav");
const speech = await synthesize("Hola, ¿qué tal?", { language: "es-ES" });
await speech.saveSrt("hola.srt");The loudness-tts command makes audio files with subtitles, lists voices and runs a speech server that answers like OpenAI’s speech API:
loudness-tts voices --language de --min-score 75
loudness-tts download --language es-ES
loudness-tts serve --port 8880Connect it to your chat app with one of the guides below. In Docker, the server is one command:
docker run -p 8880:8880 -v loudness-tts:/data ghcr.io/loudness-ai/loudness-ttsPython or JavaScript on Windows, macOS and Linux, first speech with subtitles, the speech server, Docker and offline use.
Read Open WebUI answers aloud with natural voices that run on your own machine.
Configure librechat.yaml so LibreChat reads messages aloud with free local voices.
Use AnythingLLM’s OpenAI Compatible provider with free voices on your own machine.
Every voice in the catalogue allows commercial use; most ask for a credit line, which loudness-tts provides for each voice. The ranking, method and data are public:
Open Piper TTS Voices RankedTeaching Piper TTS to ReadPiper Voice Explorer
Dataset on Hugging Face
Speech is made on your computer, your server or the visitor’s device. The only network requests are voice downloads from their publishers. Text is never sent anywhere or logged.
loudness-tts is GPL-3.0-or-later. Its text preparation layer is Apache-2.0 and can be reused on its own. Voices keep their own licences.
Make speech online with more voices, or finish your audio:
GitHubPyPIReleasesDocker image
Try it in your browserInstallation guideAI Noise Remover SDKAll developer guides