loudness.ai

SDK

loudness-tts

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.

1,683 ranked voices

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.

Reads like a person

Prices, dates, times, units, phone numbers, abbreviations and Roman numerals become words in English and Spanish, with natural pauses.

Ready to publish

Loudness set to −16 LUFS with true peak at or below −1.5 dBTP, exact word timings and SRT or VTT subtitles.

Fast on a CPU

About 20 times faster than real time on a laptop, with the first sentence of a stream in under 0.2 seconds. No GPU.

Python and JavaScript

The same speech from both editions: Python, plus Node.js, Bun, Deno and web browsers through WebAssembly.

OpenAI-compatible server

A local speech server that apps such as Open WebUI, LibreChat and AnythingLLM can use instead of a paid service.

Python

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.srt

Speak 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())

JavaScript and TypeScript

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.tgz

Then 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");

Command line and speech server

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 8880

Connect 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-tts

Voices and licences

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:

Text stays on your machine

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.

Licence

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.

Prefer the browser?

Make speech online with more voices, or finish your audio:

Links

More from Loudness.ai

Sign in to Loudness.ai