feat(huddle): add selectable multilingual STT with SenseVoice - #4534
feat(huddle): add selectable multilingual STT with SenseVoice#4534LauraGPT wants to merge 2 commits into
Conversation
…block#2478) Huddle transcription was hard-pinned to an English-only STT model, so non-English speech transcribed as garbage (block#2478). There was no language setting, env override, or model-swap path — the loader knew one model. Make the huddle STT model selectable behind a small registry: - `STT_MODELS` in huddle/models.rs is the single source of truth for each model: id, download URL, archive checksum, expected files, sherpa-onnx family, manifest version, license, and language coverage. - `select_stt_model` picks a model from the `BUZZ_STT_MODEL` override, then the system locale (non-English -> multilingual), then the English default. The function is pure and unit-tested. - Two models ship: the existing Parakeet TDT-CTC 110M (English, default) and Parakeet TDT 0.6B v3 (multilingual, 25 European languages). Both carry a pinned SHA-256; the v3 hash was computed from the k2-fsa release archive. - huddle/stt.rs configures the sherpa-onnx recognizer per family: NeMo CTC (single model.int8.onnx) or transducer (encoder/decoder/joiner). tokens.txt is shared. The archive checksum is now optional per model (size cap, safe extraction, and expected-files verification always apply); the English default stays pinned. Coverage note: Parakeet v3 covers European languages only. Korean/CJK — the concrete case in block#2478 — is a follow-up: the registry makes adding a CJK model (e.g. SenseVoice-Small) one data entry plus a family already modelled. Zero unsafe, no panics/unwraps on the new paths. New model selection logic is covered by unit tests in huddle::models. Refs block#2478 Signed-off-by: Taras Kornichuk <dread9ko@gmail.com> (cherry picked from commit 9236cb8) Signed-off-by: LauraGPT <18321252+LauraGPT@users.noreply.github.com>
(cherry picked from commit 06f0e88) Signed-off-by: LauraGPT <18321252+LauraGPT@users.noreply.github.com>
|
@tlongwell-block, this is the current-main, complete follow-up to #2520 for the organic Korean STT request in #2478. It preserves Taras Kornichuk as author of the registry work and adds the finished SenseVoice path for The exact PR head is mergeable and all three available GitHub checks pass. Current-main validation completed with 146 huddle tests, Clippy using The repository review-request API is unavailable to this external contributor, so this is the single maintainer handoff; I will not repeat it unless the PR state changes. |
Summary
This is the current-
mainrescue of #2520 plus the complete SenseVoice path requested by the #2478 reporter. Huddle transcription is no longer hard-pinned to an English-only model, and the reported Korean case is covered directly.BUZZ_STT_MODELoverride.zh,yue,ja, andkolocales to SenseVoiceSmall.main.Closes #2478.
Relationship to #2520
#2520 introduced the registry and Parakeet v3 but cannot satisfy the issue's Korean acceptance criterion. Its contributor branch has remained at
9236cb855whilemainadvanced substantially, and the completed SenseVoice collaboration patch inartile/buzz#1cannot be merged by this PR author.This PR preserves Taras Kornichuk as the author of the registry commit, including the original DCO sign-off, then applies the SenseVoice follow-up on top. It supersedes #2520 and
artile/buzz#1without discarding their history or attribution.Selection behavior
parakeet-enparakeet-v3sensevoiceUnknown locales fall back to the English default instead of silently selecting a multilingual model that does not support them. Any registered model can be selected explicitly with
BUZZ_STT_MODEL.Artifact and runtime verification
SenseVoice archive:
163002883bytes7d1efa2138a65b0b488df37f8b89e3d91a60676e416f515b952358d83dfd347emodel.int8.onnx,tokens.txtReal CPU inference with sherpa-onnx 1.13.4 succeeded for all official packaged samples:
The Korean sample produced normal Korean text rather than forced English tokens.
Validation
cargo test --manifest-path desktop/src-tauri/Cargo.toml huddle:: -- --nocapture: 146 passed, 0 failedcargo clippy --manifest-path desktop/src-tauri/Cargo.toml -- -D warnings: passedcargo fmt --manifest-path desktop/src-tauri/Cargo.toml --check: passedgit diff --check: passedNo new dependency is introduced.