Guide
Install loudness-tts
This guide installs loudness-tts, makes your first speech with subtitles and starts the speech server that chat apps can use. It takes about five minutes, plus one voice download.
1Check what you need
For Python: Python 3.9 or newer. For JavaScript: Node.js 20 or newer, Bun or Deno. Each voice is a one-time download of 20 to 140 MB; the default English voice is about 80 MB. FFmpeg is optional: it adds MP3, Opus, AAC and FLAC output, which chat apps such as LibreChat and AnythingLLM expect.
python3 --version node --version2Install the Python package
On macOS and Linux:
python3 -m venv .venv source .venv/bin/activate python -m pip install loudness-ttsOn Windows, in PowerShell:
py -m venv .venv .venv\Scripts\activate python -m pip install loudness-ttsFor word timings taken from the voice model itself, which give the most exact subtitles, add the optional extra:
python -m pip install "loudness-tts[timings]".3Make your first speech
loudness-tts "Dr. Smith paid $5.50 on 4/5/2026 at 9:30 AM." -o speech.wav --srt speech.srtThe first run downloads the best English (US) voice and checks it against its published checksum; later runs work offline. Voices are kept in
~/.cache/loudness-tts(on Windows,%LOCALAPPDATA%\loudness-tts). Choose another language with--language es-ES, or a voice with--voice;loudness-tts voiceslists them, best first.From Python:
import loudness_tts speech = loudness_tts.synthesize("The meeting starts at 9:30 AM.") speech.save("meeting.wav") speech.save_srt("meeting.srt") print(speech.voice.credit) # the credit line the voice licence asks for4Or install the JavaScript package
Install the package file from the latest GitHub release. With Bun, use
bun addwith the same address.npm install https://github.com/Loudness-ai/loudness-tts/releases/download/v0.1.1/loudness-tts-0.1.1.tgzimport { 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");In a web page, import it with your bundler (Vite, webpack or esbuild):
speak(text)plays the speech andspeech.blob()gives a WAV file. The browser keeps each voice after its first download.5Start the speech server
loudness-tts serve --port 8880The server answers like OpenAI’s speech API at
http://127.0.0.1:8880/v1. Test it on macOS or Linux:curl http://127.0.0.1:8880/v1/audio/speech -H "Content-Type: application/json" \ -d '{"model": "tts-1", "input": "Hello from my own server!", "voice": "nova", "response_format": "wav"}' -o hello.wavTo let other computers or Docker containers use it, add
--host 0.0.0.0and protect it with--api-keyand a secret of your choice. The app guides below show the settings for Open WebUI, LibreChat and AnythingLLM.6Or run the server with Docker
docker run -d --name loudness-tts -p 8880:8880 -v loudness-tts:/data ghcr.io/loudness-ai/loudness-ttsThe image includes FFmpeg and stores voices in the
loudness-ttsvolume. To download languages when the container starts, add-e LOUDNESS_TTS_PRELOAD="en-US es-ES".7Use it offline
Download the voices you need while you are online:
loudness-tts download --language en-US loudness-tts download --language de-DEThen set
LOUDNESS_TTS_OFFLINE=1to forbid downloads;LOUDNESS_TTS_HOMEmoves the voice folder.loudness-tts doctor --synthesizechecks the whole installation.
Common problems
The voice download fails
Voices come from huggingface.co and, for three community voices, from sfo3.digitaloceanspaces.com. Allow those addresses in your firewall or proxy, or download the voices on another computer and copy the voice folder.
MP3 output says it needs FFmpeg
Install FFmpeg (brew install ffmpeg, sudo apt-get install ffmpeg or winget install --id Gyan.FFmpeg) or ask for WAV. The Docker image already includes FFmpeg.
“No voice called …”
Run loudness-tts voices --language es to see the voice ids for a language. OpenAI names such as nova and onyx map to English (US) voices.
Port 8880 is already in use
Start the server on another port, for example --port 8890, and use that port in your app.
PowerShell refuses to activate the environment
Run Set-ExecutionPolicy -Scope CurrentUser RemoteSigned once, then activate it again.
Next steps
More guides
- Install the AI Noise Remover SDKPython and FFmpeg on Windows, macOS and Linux, your first noise removal and the JavaScript build.
- Free local text to speech for Open WebUIRead Open WebUI answers aloud with natural voices that run on your own machine.
- Free local text to speech for LibreChatConfigure librechat.yaml so LibreChat reads messages aloud with free local voices.
- Free local text to speech for AnythingLLMUse AnythingLLM’s OpenAI Compatible provider with free voices on your own machine.