How serveurpersocom/omnivoice.cpp works
OmniVoice.cpp is a local GGML-based text-to-speech engine and C ABI, with command-line, codec, and OpenAI-compatible server interfaces. The main synthesis flow accepts text and optional voice-reference data, builds prompts, generates RVQ audio codes, decodes them to 24 kHz audio, then post-processes and returns or writes the waveform. Voice design, cloning, long-form chunking, codec conversion, and server voice registration are additional product capabilities. Relationships below use README statements and source-index references; several implementation details were not sampled, so uncertain links are omitted.
Main entry points: pipeline-tts.cpp TTS orchestration · pipeline-codec.cpp Codec orchestration · omnivoice.cpp Public C ABI · omnivoice-codec.cpp Codec command line
Components 23
User interfaces
- TTS command line
tools/omnivoice-tts.cpp - Codec command line
tools/omnivoice-codec.cpp - HTTP server
src/tts-server.h - Public C ABI
src/omnivoice.cpp
Speech synthesis
- Prompt builder
src/prompt-tts.h - Voice design
src/voice-design.h - Language mapping
src/lang-map.h - Text chunking
src/text-chunker.h - TTS orchestration
src/pipeline-tts.cpp - MaskGIT generation
src/maskgit-tts.h - Qwen3 audio language model
src/omnivoice-llm.h
Codec and audio
- Codec orchestration
src/pipeline-codec.cpp - RVQ codec
src/rvq-codec.h - RVQ file format
src/rvq-file.h - DAC audio decoder
src/dac-decoder.h - Waveform post-processing
src/audio-postproc.h - Audio I/O
src/audio-io.h
Model runtime
- GGUF weight loader
src/gguf-weights.h - GGML backends
src/backend.h - Weight context
src/weight-ctx.h - BPE tokenizer
src/bpe.h - Duration estimator
src/duration-estimator.h
Other components
- User or client
Connections 28
- User or client → TTS command line: supplies text
README.md - TTS command line → Public C ABI: calls library
README.md - User or client → Codec command line: requests conversion
README.md - Codec command line → Codec orchestration: encodes or decodes
tools/omnivoice-codec.cpp - User or client → HTTP server: sends requests
README.md - HTTP server → Public C ABI: synthesizes speech
README.md - Public C ABI → TTS orchestration: runs synthesis
src/omnivoice.cpp - Public C ABI → Codec orchestration: uses codec
src/omnivoice.cpp - Public C ABI → Voice design: applies voice design
src/omnivoice.cpp - Public C ABI → Waveform post-processing: post-processes audio
src/omnivoice.cpp - TTS orchestration → Prompt builder: builds prompts
src/pipeline-tts.cpp - TTS orchestration → MaskGIT generation: runs generation
src/pipeline-tts.cpp - TTS orchestration → Codec orchestration: decodes codes
src/pipeline-tts.cpp - TTS orchestration → Text chunking: chunks text
src/pipeline-tts.cpp - TTS orchestration → Waveform post-processing: post-processes audio
src/pipeline-tts.cpp - Prompt builder → BPE tokenizer: tokenizes text
src/prompt-tts.h - Prompt builder → Language mapping: maps languages
src/prompt-tts.h - MaskGIT generation → Qwen3 audio language model: uses model
src/maskgit-tts.h - Codec orchestration → RVQ codec: encodes and decodes
- Codec orchestration → DAC audio decoder: decodes waveforms
- Codec orchestration → GGUF weight loader: loads weights
- Codec command line → RVQ file format: reads or writes codes
tools/omnivoice-codec.cpp - HTTP server → Audio I/O: uses audio I/O
src/tts-server.h - TTS orchestration → GGML backends: schedules inference
- TTS orchestration → Weight context: holds weights
- Codec orchestration → GGML backends: runs inference
- GGUF weight loader → Weight context: loads tensors into
src/gguf-weights.h - TTS orchestration → Duration estimator: estimates duration
src/pipeline-tts.cpp