Tiny offline text-to-speech (TTS) for Python that runs on your own CPU.
Two natural English voices, 44 MB each. No GPU, no cloud, no PyTorch. Just pip install flockspeech.
Voices · Installation · Quick start · Sound tags · How it works · FAQ
Flock Speech (flockspeech) is a lightweight, open-source text-to-speech (TTS) library for Python. It turns
English text into natural 24 kHz speech offline, on an ordinary CPU, on laptops, servers and 64-bit ARM boards. It
ships two small neural TTS voices:
- Goldfinch, a conversational voice that says "uh" and "you know", and laughs or breathes on cue with sound tags
like
[laugh]. - Junco, a clear, neutral reading voice for assistants, screen readers and narration.
The voices run with ONNX Runtime and numpy, so there is no GPU, no cloud API key and no PyTorch to install. Your text never leaves your machine.
| Feature | Flock Speech |
|---|---|
| Model size | 44.2 MB per voice, 61.3 MB for both (they share one 27.1 MB vocoder) |
| Parameters | 11.4M acoustic model + 13.5M vocoder |
| Speed | 8.7× real time on one CPU thread, 19× on four (Apple M1) |
| Start-up | under a second |
| Memory | about 215–265 MB peak for one voice |
| First audio when streaming | about 0.25 s |
| Output | 24 kHz mono |
| Runtime | ONNX Runtime + numpy. Works offline; nothing is downloaded at run time |
| Platforms | macOS, Linux (x86-64 and ARM64, including a 64-bit Raspberry Pi OS), Windows |
| License | Apache-2.0 for code and weights |
Every Flock Speech voice is named after a songbird.
|
Junco v0.1: a clear, neutral reading voice. Best for assistants, screen readers, notifications and narration. Junco() · --voice junco (default) · model cardListen: greeting · assistant · story · news |
|
|
Goldfinch v0.1: a relaxed, conversational voice that says "uh", laughs and breathes. Best for chat companions, game characters and spoken dialogue. Goldfinch() · --voice goldfinch · model cardListen: laugh · chat · plan · reaction |
Both voices speak English (US). Each is one speaker; there is no voice cloning.
pip install flockspeechThat's all. The voices are bundled in the package, and the phonemiser (espeak-ng) comes as a pip dependency, so there is nothing else to install. Python 3.10 or newer.
flockspeech "Hello! I'm Junco, and I run on your own computer." -o hello.wav --play
flockspeech "Oh my gosh, [laugh] I can't believe you actually did that." --voice goldfinch --playThe CLI also reads text from a file (-f story.txt) or from standard input (echo hi | flockspeech -).
from flockspeech import Junco, Goldfinch
tts = Junco() # loads in under a second
audio = tts("Hello there.") # float32 numpy array, 24 kHz mono
tts.save("Hello there.", "hello.wav")
# Low latency: audio is produced sentence by sentence
for chunk in tts.stream(long_text):
play(chunk)
chat = Goldfinch()
chat.save("Yeah, um, we usually eat dinner around six. [laugh] Late, I know.", "chat.wav")You can also pick a voice by name: flockspeech.load("goldfinch").
Goldfinch understands sound tags. Write one in square brackets where the sound should go:
That's hilarious. [laugh] No, really, it is.
[breath] Okay, so here's the plan for tomorrow.
| Tag | Also accepted | Sound | Reliability |
|---|---|---|---|
[laugh] |
[laughs], [giggle], [chuckle] |
a short laugh | good |
[breath] |
[inhale], [exhale] |
an audible breath | good |
[throat] |
[clears throat], [cough] |
clearing the throat | fair |
[lipsmack] |
[lip smack] |
a lip smack | fair |
[sigh] |
a sigh | weak | |
[noise] |
a short non-speech noise | weak |
[sigh] and [noise] had few training examples, so they are weaker. Fillers need no tags: write them as words ("uh",
"um", "you know"). Junco ignores tags.
| Python | CLI | Default | Effect |
|---|---|---|---|
Junco(), Goldfinch() |
--voice |
junco | which voice speaks |
speed |
--speed |
1.0 | 1.2 talks 20% faster |
steps |
--steps |
8 | generation steps; fewer is faster |
seed |
--seed |
0 | fixes the small random variation in delivery |
threads |
--threads |
up to 4 | CPU threads for ONNX Runtime |
coreml |
--coreml |
off | Apple silicon: run the vocoder with CoreML. Faster on 1 thread, twice the memory |
--play |
off | play the result | |
-o |
out.wav | output file (24 kHz, 16-bit WAV) |
- Phonemes. espeak-ng turns the text into phonemes. Sound tags become extra symbols.
- Acoustic model. A compact neural network turns the phonemes into a mel spectrogram.
- Vocoder. Vocos turns the spectrogram into sound.
Each voice's acoustic model has 11.4M parameters and was trained from scratch on a single T4 GPU in about three hours: Junco on LJ Speech, Goldfinch on DisfluencySpeech.
No. Both voices run on an ordinary CPU with ONNX Runtime, and the models are bundled in the package. After
pip install flockspeech, speech is generated fully offline and your text never leaves your machine.
Each voice is 44.2 MB: a 17.1 MB acoustic model plus a 27.1 MB vocoder. The two voices share the vocoder, so both together take 61.3 MB.
Use Goldfinch and write a sound tag in square brackets where the sound should go:
Goldfinch()("That's hilarious. [laugh] No, really."). See Sound tags for the full list.
Yes. tts.stream(text) yields audio sentence by sentence, so playback can start while the rest is still being
generated.
English (US), with two voices: Goldfinch (conversational) and Junco (reading). There is no voice cloning.
Write them out in words, such as "five dollars" rather than "$5", and "Doctor" rather than "Dr.". Text normalisation is not built in yet.
macOS, Linux and Windows, on x86-64 and 64-bit ARM, wherever onnxruntime and espeakng-loader publish wheels. That
includes 64-bit ARM Linux, such as Raspberry Pi OS. Python 3.10 or newer.
The code and voice weights are Apache-2.0 and the bundled Vocos vocoder is MIT, so commercial use is allowed. The phonemiser (phonemizer and espeak-ng) is GPL-3.0 and is installed as a separate dependency; review its terms before shipping it inside a closed-source product. See License.
- PyPI: https://pypi.org/project/flockspeech/
- Junco model card: https://huggingface.co/flockspeech/junco
- Goldfinch model card: https://huggingface.co/flockspeech/goldfinch
- Code and voice weights: Apache-2.0.
- Vocos vocoder weights: MIT (Charactr Inc.), bundled.
- Phonemiser: phonemizer and espeak-ng (through
espeakng-loader) are GPL-3.0. They are installed as separate dependencies and are not included in this package.
The Flock Speech name and logo are not covered by the Apache License. See NOTICE for details.