chatterbox-fast v0.1.0
ci / test (push) Has been cancelled

Sub-second streaming TTS on Chatterbox-Turbo via adaptive buffer-ratchet
chunking. First audio in ~0.5s (vs ~5s one-shot) with no quality compromise —
chunk joins land on natural sentence pauses and the stream converges to one
large near-full-context chunk within 2-3 joins. Works because the engine runs
faster than realtime; the no-starvation guarantee is proven in a GPU-free
simulation (tests/test_scheduler.py).

- chatterbox_fast/scheduler.py: the adaptive-chunk scheduler (pure logic, no GPU)
- chatterbox_fast/app.py: FastAPI server (POST /tts streaming, /voices, /health)
- bench.py: streaming client (ground-truth TTFB + starvation check)
- Self-contained Dockerfile (slim base + chatterbox-tts from PyPI)
- Three public-domain LibriVox starter voices baked in (see voices/ATTRIBUTION.md)

MIT licensed.
This commit is contained in:
vh
2026-06-02 10:43:21 -07:00
commit 76314624bb
17 changed files with 1288 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
# Starter voice attribution
The voices shipped with chatterbox-fast are short clips from **LibriVox**, whose
recordings are dedicated to the **public domain** in the USA
(<https://librivox.org/pages/public-domain/>). No attribution is legally required;
it's provided here out of respect for the volunteer readers.
All three are excerpts from *LibriVox Short Poetry Collection 001*
(<https://archive.org/details/short_poetry_001_librivox>):
| voice | reader | from |
|---|---|---|
| `catharine` | Catharine Eastman | "Dover Beach" — Matthew Arnold |
| `peter` | Peter Yearsley | "Lament of the Irish Emigrant" — Lady Dufferin (H. Selina) |
| `kara` | Kara Shallenberg | "How They Brought the Good News from Ghent to Aix" — Robert Browning |
Each is a ~20-second mono excerpt, used as a voice-cloning reference. The underlying
poems are themselves in the public domain.
+19
View File
@@ -0,0 +1,19 @@
# voices
Each `*.wav` in this directory is a predefined voice. The file **stem** becomes
the voice name returned by `GET /voices` and selectable via the `voice` request
field. The server clones the reference on the fly — no training, no enrollment.
**A good reference clip is:** 5–30 seconds, a single speaker, clean (minimal
noise/music), 16 kHz or higher, mono. Match the clip's language to your text.
Add a voice by dropping a wav in here (or mounting your own directory at
`CBF_VOICES_DIR`); `/voices` re-scans on every call, so no restart is needed.
## Licensing note
The voices shipped in this open-source repository are **redistributable** (public
domain / explicitly licensed for redistribution). If you add your own voices,
make sure you have the right to use — and, if you redistribute the image, to
share — those clips. Don't ship voices of real people or copyrighted characters
without permission.
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.