# higgstts.cpp

Standalone C++/GGML inference for [Higgs TTS 3](https://huggingface.co/bosonai/higgs-tts-3-4b): expressive conversational TTS across 100+ languages with zero-shot voice cloning and inline control tokens.

Same philosophy as [qwentts.cpp](https://github.com/ServeurpersoCom/qwentts.cpp), [omnivoice.cpp](https://github.com/ServeurpersoCom/omnivoice.cpp) and [acestep.cpp](https://github.com/ServeurpersoCom/acestep.cpp): minimal, vertical, close to the metal. No Python at inference time.

## Model

| Component | Spec |
|---|---|
| Talker | Qwen3-4B decoder (36 layers, hidden 2560, GQA 32/8, QK-norm) |
| Audio tokens | 8 RVQ codebooks x 1026 vocab, delay pattern, 25 fps |
| Codec | DAC acoustic decoder (Snake + transposed convs), 24 kHz |

## Build

```sh
./buildcuda.sh      # CUDA
./buildvulkan.sh    # Vulkan
./buildcpu.sh       # CPU + BLAS
./buildall.sh       # all backends, dynamic loading
```

Windows: `buildcuda.cmd` / `buildvulkan.cmd` / `buildall.cmd` (VS 2022 Build Tools).

## Layout

```
src/            core library (higgs-core)
tools/          higgs-tts, higgs-codec, tts-server, quantize
tests/          ABI test, cossim harness vs the Python reference
examples/       CLI and server usage
checkpoints/    HF checkpoints (checkpoints.sh)
models/         GGUF models (models.sh, convert.py, quantize.sh)
ggml/           ggml submodule
vendor/         cpp-httplib, yyjson
```

## License

MIT for this code. Higgs TTS 3 weights are released under the Boson Higgs TTS 3 Research and Non-Commercial License: check it before any production use.
