Skip to content
View flockspeech's full-sized avatar
  • Joined Nov 9, 2026

Block or report flockspeech

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Content in all repositories owned by your account will be closed.
Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. This note will only be visible to you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
flockspeech/README.md

Flock Speech: tiny offline text-to-speech (TTS) for Python

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.

PyPI Runs on CPU, offline License: Apache-2.0 Junco on Hugging Face Goldfinch on Hugging Face

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.


Highlights

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

Voices

Every Flock Speech voice is named after a songbird.

Junco, the reading text-to-speech voice Junco v0.1: a clear, neutral reading voice.
Best for assistants, screen readers, notifications and narration.
Junco() · --voice junco (default) · model card
Listen: greeting · assistant · story · news
Goldfinch, the conversational text-to-speech voice 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 card
Listen: laugh · chat · plan · reaction

Both voices speak English (US). Each is one speaker; there is no voice cloning.


Installation

pip install flockspeech

That'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.


Quick start

Command line

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 --play

The CLI also reads text from a file (-f story.txt) or from standard input (echo hi | flockspeech -).

Python

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").


Sound tags

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.


Options

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)

How it works

  1. Phonemes. espeak-ng turns the text into phonemes. Sound tags become extra symbols.
  2. Acoustic model. A compact neural network turns the phonemes into a mel spectrogram.
  3. 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.


FAQ

Does Flock Speech need a GPU or an internet connection?

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.

How big are the models?

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.

How do I make the voice laugh, sigh or breathe?

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.

Can I stream the audio for low latency?

Yes. tts.stream(text) yields audio sentence by sentence, so playback can start while the rest is still being generated.

Which languages and voices are available?

English (US), with two voices: Goldfinch (conversational) and Junco (reading). There is no voice cloning.

How should I write numbers, dates and abbreviations?

Write them out in words, such as "five dollars" rather than "$5", and "Doctor" rather than "Dr.". Text normalisation is not built in yet.

Which platforms does it run on?

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.

Can I use it in a commercial product?

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.


Links


License

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

Popular repositories Loading

  1. flockspeech flockspeech Public

    Tiny offline text-to-speech (TTS) for Python. Two natural English voices, 44 MB each, run on any CPU with ONNX Runtime: no GPU, no cloud. Goldfinch is conversational and laughs on cue with [laugh] …

    Python