Skip to content
Projekte

Über uns

Sprachsynthese, Spracherkennung und Spracherkennung der Sprachaktivität für Sprachkonversationen in C++ auf ggml: Qwen3-TTS, Irodori-TTS, Qwen3-ASR, ReazonSpeech, parakeet und Silero VAD für Metal, Vulkan und die CPU sowie ein OpenAI-kompatibler Server und Live-Transkription.

KI und maschinelles Lernen

So werden diese Zahlen gemessen

Gemessener Sternzuwachs

in 24h
+27
in 7 days
+82
in 15 days
+134
in 1 month
Verlauf wird gesammelt

Nettoänderungen in überlappenden Zeiträumen, keine Tagessummen. Fehlende Messwerte bleiben leer. Sterne zeigen Interesse, nicht Qualität.

README.md

Original

speech.cpp

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 · 日本語

CI Latest release macOS on Apple Silicon, with Metal Windows on x64, with Vulkan Linux on x64, with Vulkan or the CPU Browsers, as WebAssembly MIT License

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.6b sends 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: speech fetches each model by name, one file with its codec.
  • OpenAI's API on your computer. speech serve answers 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 on its Speak tab: a sentence spoken by Qwen3-TTS 0.6B, with its waveform and the time to its first audio
The page of speech serve --open: pick a model of the catalog, fetch it and try it.

The Transcribe tab: the same speech written by Qwen3-ASR 0.6B, a region at a time where Silero VAD finds speech
Transcribe writes a file or a recording, a region at a time where someone speaks.
The Live tab while someone speaks: the first sentence final and the next one in grey as it is said
Live writes the microphone as you speak; the grey text is the utterance still being said.
The Talk tab during a conversation with Haru-4B: a lane of beads for each side and the text the model says
Talk holds a spoken conversation with a dialogue model, which listens and speaks at the same time.

Install

macOS on Apple silicon and Linux on x86-64:

curl -fsSL https://raw.githubusercontent.com/nyosegawa/speech.cpp/main/install.sh | sh

Windows x64, in PowerShell:

irm https://raw.githubusercontent.com/nyosegawa/speech.cpp/main/install.ps1 | iex

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

Quick start

  1. 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."
    
  2. 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.
    
  3. 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.

Models

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 de en es fr ja ko pt ru zh a spoken conversation, listening and speaking at once; a research model; 10.56 GB

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.

Command line

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.

From a program

  • HTTP. speech serve qwen3-tts-0.6b qwen3-asr-0.6b answers POST /v1/audio/speech and POST /v1/audio/transcriptions as OpenAI does, Realtime transcription at /v1/realtime, and, given a dialogue model such as haru-4b, conversations at /v1/dialogue. It listens on 127.0.0.1 without authentication (docs/server.md).
  • A worker process. speech worker MODEL keeps a model loaded and takes one JSON request per line on stdin (docs/worker.md).
  • The C API. Link libspeech from a release archive and include speech.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 */

Accuracy and speed

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

Documentation

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

License

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.

Ähnliche Projekte entdecken

Wird geladen…