zeekayandHanzo Dev 15a656cce8 speech 0.1.10 — each gate runs its own suite, and says which
0.1.9 never built. The live stage died at collection with

  test_speech.py:15: import bench
  E   ModuleNotFoundError: No module named bench

and every car after it stops, so nothing was published — 0.1.6 stayed the newest
image that exists while three versions sat merged.

The cause is that both stages ran a bare `pytest -q`, which collects whatever
files happen to be in the image, so each stage needed its file list maintained by
hand and the two lists had to agree. bench.py arrived with 0.1.9 and went into
the test stage list only. The live stage then collected a test_speech.py whose
import was not there.

Naming the suite in each stage removes the class, not just this instance: a stage
now runs exactly what it declares, so a new test file cannot be picked up by a
stage that was never given what it needs. It also stops the live stage re-running
the stubbed suite — test_speech.py monkeypatches stt.transcribe and tts.speak, so
against real weights it proved nothing the test stage had not already proven, and
test_live.py never imported bench at all.

Proven rather than reasoned: hiding bench.py makes `pytest -q test_speech.py`
exit 2 with that same ModuleNotFoundError, and restoring it passes 50 tests;
test_live.py collects its 8 standalone.

Co-authored-by: Hanzo Dev <[email protected]>
2026-08-12 18:52:42 -07:00

speech

CPU speech for the Hanzo platform: STT (faster-whisper, CTranslate2 int8) and TTS (kokoro-onnx, 82M) behind one OpenAI-shaped surface.

Routes

  • POST /v1/audio/transcriptions — multipart file + model (+language, response_format) → {"text": …}
  • POST /v1/audio/speech — {model, input, voice, response_format} → audio bytes (mp3 default, wav native)
  • GET /v1/models, GET /healthz

Trust model

No auth of its own, in-cluster only. api.hanzo.ai fronts it through the ai plane, which authenticates and meters every caller — a provider row pointing at http://speech.hanzo.svc/v1 is the whole integration. Weights bake into the image at build; the container boots without the network.

Run

uv sync && uv run uvicorn main:app --port 8000

Phase 2 is /v1/realtime: websocket full-duplex (silero-vad segmentation, partial transcripts, kokoro frames, barge-in) plus camera-frame relay into the multimodal models.

S
Description
CPU speech service: STT (faster-whisper) + TTS (kokoro) behind api.hanzo.ai /v1/audio
Readme Apache-2.0
361 KiB
Languages
Go 98.8%
Dockerfile 1.2%