loudkit
Text-to-speech that runs on your own hardware.

loudkit has 28 voices in ten languages, clones a voice from about ten seconds
of audio, and has native SDKs for Python, Swift, Go, Rust and TypeScript. After
the first model download it runs offline. It needs no account, sends no
telemetry and has no usage fees.
LoudReader, a reading app, uses loudkit as its speech
engine. loudkit is licensed under Apache-2.0.
Hear the voices |
Try the online demo |
Open in Colab |
Model |
Documentation
Quickstart
pip install "loudkit[torch,audio,hub]"
loudkit speak --voice joe "Hello from loudkit." --play
The first run downloads the 747 MB model and the 28 voices. After that, it runs
offline. speak writes out.wav by default, and --play plays it with the
system player. Use -o hello.wav to choose the file name. Other English voices
work the same way, for example --voice kathleen or --voice henry. A voice
reads text in its own language unless you pass --language.
Python
import loudkit as lk
engine = lk.load("loudreader/loudr-1")
voice = engine.voice("joe")
engine.synthesize("Hello from loudkit.", voice, seed=7).save("hello.wav")
engine.voices() lists the 28 names. All 28 voices are in both model downloads
and load by name. synthesize splits long text into chunks and returns one
waveform. engine.stream(...) yields the same audio chunk by chunk, so
playback can start early.
Read Getting started
next.
Swift, Go, Rust and TypeScript
Each port loads the model by name. The first call downloads and verifies it,
and later calls run offline. The snippets need version 0.1.3 of each package.
Swift (CoreML, macOS 14 or iOS 17). Add
.package(url: "https://github.com/loudreader/loudkit", from: "0.1.3") to
Package.swift. Guide.
import LoudKit
let engine = try await Engine.load("loudreader/loudr-1")
let voice = try engine.voice(named: "joe")
try engine.synthesize("Hello from loudkit.", voice: voice, seed: 7).saveWav("hello.wav")
Go (ONNX Runtime). go get github.com/loudreader/loudkit/[email protected].
Guide.
eng, err := loudkit.Load("loudreader/loudr-1")
if err != nil { log.Fatal(err) }
defer eng.Close()
v, err := eng.Voice("joe")
if err != nil { log.Fatal(err) }
res, err := eng.Synthesize("Hello from loudkit.", v, loudkit.Options{Seed: 7})
if err != nil { log.Fatal(err) }
if err := res.SaveWav("hello.wav"); err != nil { log.Fatal(err) }
Rust (ONNX Runtime). cargo add [email protected].
Guide.
use loudkit::{Engine, Options};
let mut engine = Engine::load("loudreader/loudr-1")?;
let voice = engine.voice("joe")?;
let options = Options { seed: 7, ..Default::default() };
engine.synthesize("Hello from loudkit.", &voice, &options)?.save_wav("hello.wav")?;
TypeScript (ONNX Runtime, Node 20). npm install [email protected].
Guide.
import { Engine } from "loudkit";