loudness.ai

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.

Updated 16 October 2026

  1. 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 --version
  2. 2Install the Python package

    On macOS and Linux:

    python3 -m venv .venv
    source .venv/bin/activate
    python -m pip install loudness-tts

    On Windows, in PowerShell:

    py -m venv .venv
    .venv\Scripts\activate
    python -m pip install loudness-tts

    For 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]".

  3. 3Make your first speech

    loudness-tts "Dr. Smith paid $5.50 on 4/5/2026 at 9:30 AM." -o speech.wav --srt speech.srt

    The 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 voices lists 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 for
  4. 4Or install the JavaScript package

    Install the package file from the latest GitHub release. With Bun, use bun add with the same address.

    npm install https://github.com/Loudness-ai/loudness-tts/releases/download/v0.1.1/loudness-tts-0.1.1.tgz
    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");

    In a web page, import it with your bundler (Vite, webpack or esbuild): speak(text) plays the speech and speech.blob() gives a WAV file. The browser keeps each voice after its first download.

  5. 5Start the speech server

    loudness-tts serve --port 8880

    The 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.wav

    To let other computers or Docker containers use it, add --host 0.0.0.0 and protect it with --api-key and a secret of your choice. The app guides below show the settings for Open WebUI, LibreChat and AnythingLLM.

  6. 6Or run the server with Docker

    docker run -d --name loudness-tts -p 8880:8880 -v loudness-tts:/data ghcr.io/loudness-ai/loudness-tts

    The image includes FFmpeg and stores voices in the loudness-tts volume. To download languages when the container starts, add -e LOUDNESS_TTS_PRELOAD="en-US es-ES".

  7. 7Use it offline

    Download the voices you need while you are online:

    loudness-tts download --language en-US
    loudness-tts download --language de-DE

    Then set LOUDNESS_TTS_OFFLINE=1 to forbid downloads; LOUDNESS_TTS_HOME moves the voice folder. loudness-tts doctor --synthesize checks 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

All developer guides

More from Loudness.ai

Sign in to Loudness.ai