Speech synthesis, speech recognition, voice activity detection and speaker diarization for voice conversation, in C++ on ggml
Install · Quick start · Models · Documentation · C API
English · 日本語
speech.cpp runs speech models on your own computer: it speaks text, writes the text of recordings and of the
microphone, finds who speaks where, removes noise, and holds spoken conversations. It is one command, speech, and one
library, libspeech, with a C API, on the CPU, Metal and Vulkan through ggml.
- Fast first audio. On an Apple M5,
qwen3-tts-0.6bsends its first audio 0.029 s after the text, and the rest follows while it plays. - Nothing else to install. No Python and no CUDA:
speechfetches each model by name, one file with its codec. - OpenAI's API on your computer.
speech serveanswers OpenAI's audio API and Realtime transcription, so an OpenAI client works by changing its base URL. - Checked against the official code. Every stage of every model is compared with the official implementation.

The page of speech serve --open: pick a model of the catalog, fetch it and try it.
macOS on Apple silicon and Linux on x86-64:
curl -fsSL https://raw.githubusercontent.com/nyosegawa/speech.cpp/main/install.sh | shWindows x64, in PowerShell:
irm https://raw.githubusercontent.com/nyosegawa/speech.cpp/main/install.ps1 | iexThe installer checks the archive's SHA-256, puts speech under your home folder and adds it to PATH; speech update
updates it. Linux gets the Vulkan build when the Vulkan loader is installed, and the CPU build otherwise.
docs/install.md has the requirements, uninstalling and building from
source. For web pages, each release also has a WebAssembly build
(docs/browser.md).
-
Speak a sentence. The model is fetched the first time (1.21 GB):
speech tts qwen3-tts-0.6b --voice ryan -o hello.wav "Hello. It will be sunny in Tokyo tomorrow." -
Write its text back (0.84 GB the first time):
speech asr qwen3-asr-0.6b hello.wav
Hello, it will be sunny in Tokyo tomorrow. -
Open a page on which to pick models, speak and transcribe:
speech serve --open
speech models lists every model and, for each language, the model to start with.
| Task | Model | Names | Languages | Good at |
|---|---|---|---|---|
| Synthesis | Qwen3-TTS | qwen3-tts-0.6b, qwen3-tts-1.7b |
de en es fr it ja ko pt ru zh | nine named speakers, audio from its first 0.08 s; the 1.7B model follows instructions on how to speak |
| Synthesis | Irodori-TTS | irodori-tts-mf, irodori-tts, irodori-tts-large |
ja | Japanese in the voice of a recording, or of a voice described in words |
| Synthesis | Drama 3 | drama-3 |
83 languages | scenes of up to 16 speakers with cues such as laughter; 20.8 GB. Built with Fish Audio |
| Recognition | Qwen3-ASR | qwen3-asr-0.6b, qwen3-asr-1.7b |
30 languages | finds the language, takes a prompt of names and terms, up to 20 minutes at once |
| Recognition | ReazonSpeech | reazonspeech-v2 |
ja | Japanese with punctuation and times, recordings of many minutes whole |
| Recognition | Parakeet | parakeet-tdt_ctc-0.6b-ja, parakeet-tdt-0.6b-v3, parakeet-tdt_ctc-0.6b-ja-dialogue |
ja; 25 European languages | fast, with times; finds the European language itself; DeNA's fine-tune for voice dialogue |
| Recognition | Haas | haas-ja-v1.0, haas-ja-v1.0-dialogue |
ja | fast Japanese with punctuation and a custom vocabulary; DeNA's fine-tune for voice dialogue |
| Recognition | Nemotron 3.5 ASR Streaming | nemotron-3.5-asr-streaming-0.6b, nemotron-3.5-asr-streaming-0.6b-ja-dialogue |
28 languages; ja | audio computed in chunks of 80 ms to 1.12 s; DeNA's fine-tune for voice dialogue |
| Recognition | Nemotron 3.5 Transcribe | nemotron-3.5-transcribe |
40 languages | word for word, up to an hour at once, with who speaks and each word's time; 19.0 GB |
| Detection | Silero VAD | silero-vad |
any | where someone speaks; 1.2 MB |
| Diarization | Nemotron 3 Diarization | nemotron-3-diarization |
any | who speaks when, up to eight speakers, also as audio arrives |
| Enhancement | RE-USE | re-use, re-use-laughter |
any | removes noise, reverberation and band limits; the second keeps laughter |
| Dialogue | Haru | haru-4b, haru-122b-preview |
de en es fr ja ko pt ru zh | a spoken conversation, listening and speaking at once; research models; 10.56 GB, and 80.08 GB for the 122B model, whose experts the CPU computes where the GPU cannot hold them |
A command takes a model by its name and fetches its file from Hugging Face the first time. docs/models.md has the files, voices, languages and licenses.
| Subcommand | What it does |
|---|---|
speech tts |
speaks text into a WAVE file or to stdout |
speech asr |
writes the text of WAVE files, or of the microphone as someone speaks |
speech vad |
writes where someone speaks |
speech diarize |
writes who speaks where |
speech enhance |
removes noise and other degradations |
speech talk |
holds a conversation through the microphone with a dialogue model |
speech voice |
makes a voice file from reference recordings |
speech info, speech devices |
print what a model file holds, and the devices a model can run on |
speech models, pull, rm |
list, fetch and remove models |
speech quantize |
writes a model file in a smaller weight type |
speech update |
installs the latest release |
speech serve |
serves models over HTTP with OpenAI's audio API, and a page to try them |
speech worker |
serves a model over JSON Lines on stdin and stdout, for programs |
speech voice irodori-tts-mf me.wav me.voice.gguf
speech tts irodori-tts-mf --add-voice me=me.voice.gguf --voice me -o - < story.txt | ffplay -nodisp -autoexit -
speech asr qwen3-asr-1.7b --language ja --prompt "Claude Code、渋谷" meeting.wav
speech asr reazonspeech-v2 --vad silero-vad --live
speech enhance re-use street.wav -o clean.wav
speech talk haru-4b --live --language ja --name ハル --persona "落ち着いた話し方をする大学生。"speech info MODEL lists the options a model takes, each a flag. docs/cli.md has every subcommand.
- HTTP.
speech serve qwen3-tts-0.6b qwen3-asr-0.6banswersPOST /v1/audio/speechandPOST /v1/audio/transcriptionsas OpenAI does, Realtime transcription at/v1/realtime, and, given a dialogue model such asharu-4b, conversations at/v1/dialogue. It listens on 127.0.0.1 without authentication (docs/server.md). - A worker process.
speech worker MODELkeeps a model loaded and takes one JSON request per line on stdin (docs/worker.md). - The C API. Link
libspeechfrom a release archive and includespeech.h(docs/c-api.md):
speech_model * model = NULL;
speech_request * request = NULL;
speech_model_load("Qwen3-TTS-12Hz-0.6B-CustomVoice-Q8_0.gguf", NULL, &model);
speech_request_new(model, &request);
speech_request_set_text(request, "Hello.");
speech_request_set_string(request, SPEECH_OPT_VOICE, "ryan");
speech_synthesize(request, on_audio, NULL); /* on_audio receives the samples as they are made */Measured with speech-bench, one request at a time, on an Apple M5 (Metal) and an RTX 2080 (Vulkan). Each model's page has every type and more.
Synthesis, on 20 Japanese sentences: the p50 time to first audio, the RTFx (seconds of audio over the seconds they
took; larger is faster), and the CER of the speech as qwen3-asr-1.7b hears it. On the RTX 2080, drama-3 computes
most of its experts on the CPU.
| Model | Time to first audio, M5 / RTX 2080 | RTFx | CER |
|---|---|---|---|
qwen3-tts-0.6b, Q8_0 |
0.029 s / 0.029 s | 3.7 / 5.0 | 8.1% / 8.5% |
qwen3-tts-1.7b, Q8_0 |
0.041 s / 0.041 s | 2.6 / 4.1 | 4.5% / 4.9% |
irodori-tts-mf, F16 |
0.16 s / 0.12 s | 9.0 / 18 | 6.1% / 6.4% |
irodori-tts, F16, 16 steps |
0.75 s / 0.52 s | 4.9 / 8.5 | 3.2% / 3.2% |
irodori-tts-large, Q8_0, 16 steps |
2.2 s / 1.25 s | 1.7 / 3.3 | 5.4% / 5.5% |
drama-3, Q4_K |
0.28 s / 0.57 s | 1.1 / 0.55 | 1.8% / 2.3% |
Recognition: the CER on asr-ja-bench, 23 hours of Japanese from five public test sets, with the CER that accepts other spellings of the same words in parentheses, and the p50 latency of a short utterance.
| Model | CER on asr-ja-bench | p50 latency, M5 / RTX 2080 |
|---|---|---|
qwen3-asr-0.6b, Q8_0 |
9.7% (7.5%) | 0.107 s / 0.081 s |
qwen3-asr-1.7b, Q8_0 |
7.5% (5.2%) | 0.257 s / 0.161 s |
reazonspeech-v2, Q8_0 |
12.8% (8.6%) | 0.049 s / 0.096 s |
parakeet-tdt_ctc-0.6b-ja, Q8_0 |
7.2% (3.9%) | 0.025 s / 0.047 s |
parakeet-tdt-0.6b-v3, F16 |
WER 8.8% on FLEURS English | 0.050 s / 0.083 s |
haas-ja-v1.0, Q8_0 |
6.1% (3.9%) | 0.042 s / 0.097 s |
nemotron-3.5-transcribe, IQ4_NL |
7.2% (5.0%) | 0.61 s / - |
| Page | What it covers |
|---|---|
| Install | installers, updating, uninstalling, requirements, release archives, building from source |
| Command line | every subcommand and option |
| Models | the catalog, names and types, where models are kept, voices, languages, licenses |
| Qwen3-TTS, Irodori-TTS, Drama 3, Qwen3-ASR, ReazonSpeech, Parakeet, Haas, Nemotron 3.5 ASR Streaming, Nemotron 3.5 Transcribe, Silero VAD, Nemotron 3 Diarization, RE-USE, Haru | each model: what it does, its options, accuracy, weight types and speed |
| Server and page | speech serve, OpenAI's audio API and the page |
| Worker protocol | speech worker for programs |
| C API | speech.h |
| Browser | the WebAssembly build: Silero VAD inside a web page |
speech.cpp is under the MIT License (LICENSE). The model weights are their authors', under the licenses docs/models.md lists; some restrict commercial use or voice cloning.



