mirror of
https://github.com/hanzoai/engine.git
synced 2026-11-20 14:17:52 +00:00
Wire the existing Qwen3-ASR transcribe pipeline (speech_models/qwen3_asr)
end-to-end through the serve path as a new Audio modality:
- pipeline/asr.rs: AsrLoader + AsrPipeline (ModelCategory::Audio), mirrors the
TTS SpeechLoader loading shape and the AnimationInputsProcessor audio-gather.
- auto loader detects qwen3-asr (name-gated) so `hanzo serve -m <asr-model>`
loads it; AsrLoaderType::auto_detect_from_config hardened against Omni/VL.
- RequestMessage::AudioTranscription + ForwardInputsResult::Transcription +
Response::Transcription + sequence storage + send helper (one-shot, DRY with
Speech/Frames plumbing).
- /v1/audio/transcriptions route (OpenAI-compatible): multipart file upload OR
JSON base64, decode via symphonia, transcribe(), return {text}.
- Fix stale 'mel frontend TODO' comment in qwen3_asr/mod.rs (implemented).
Tests: 4 axum route tests (real multipart + base64 extractors) pass; the
qwen3_asr_e2e transcribe test still compiles+passes (weight-gated).
hanzo-audio
This crate provides audio utilities for hanzo similar to how
hanzo-vision supplies vision helpers. It includes structures and
functions for reading audio, resampling, channel handling and computing
mel spectrogram features.
Documentation: https://docs.rs/hanzo-audio/