Skip to content

feat(huddle): add selectable multilingual STT with SenseVoice - #4534

Open
LauraGPT wants to merge 2 commits into
block:mainfrom
LauraGPT:codex/buzz-sensevoice-cjk
Open

feat(huddle): add selectable multilingual STT with SenseVoice#4534
LauraGPT wants to merge 2 commits into
block:mainfrom
LauraGPT:codex/buzz-sensevoice-cjk

Conversation

@LauraGPT

@LauraGPT LauraGPT commented Aug 3, 2026

Copy link
Copy Markdown

Summary

This is the current-main rescue 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.

  • Adds a small, integrity-pinned STT model registry and BUZZ_STT_MODEL override.
  • Keeps the existing English Parakeet model as the zero-config English default.
  • Routes supported European locales to multilingual Parakeet v3.
  • Routes zh, yue, ja, and ko locales to SenseVoiceSmall.
  • Configures each sherpa-onnx family explicitly: NeMo CTC, transducer, or SenseVoice with automatic language detection and ITN.
  • Writes the applicable model license notice beside every installed model.
  • Preserves interrupted-install recovery and the current INT8 Pocket TTS integrity checks from 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 9236cb855 while main advanced substantially, and the completed SenseVoice collaboration patch in artile/buzz#1 cannot 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#1 without discarding their history or attribution.

Selection behavior

Model id Automatic locale coverage sherpa-onnx family
parakeet-en English and fallback NeMo CTC
parakeet-v3 24 supported non-English European tags Transducer
sensevoice Chinese, Cantonese, Japanese, Korean SenseVoice

Unknown 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:

  • Size: 163002883 bytes
  • SHA-256: 7d1efa2138a65b0b488df37f8b89e3d91a60676e416f515b952358d83dfd347e
  • Required files: model.int8.onnx, tokens.txt
  • License: FunASR Model Open Source License Agreement 1.1

Real CPU inference with sherpa-onnx 1.13.4 succeeded for all official packaged samples:

Language Audio Decode
Chinese 5.592 s 0.301 s
English 7.152 s 0.372 s
Japanese 7.200 s 0.367 s
Korean 4.608 s 0.234 s
Cantonese 5.148 s 0.260 s

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 failed
  • Focused model registry/readiness suite: 18 passed, 0 failed
  • cargo clippy --manifest-path desktop/src-tauri/Cargo.toml -- -D warnings: passed
  • cargo fmt --manifest-path desktop/src-tauri/Cargo.toml --check: passed
  • git diff --check: passed
  • Both commits are SSH-signed and DCO-compliant.

No new dependency is introduced.

artile and others added 2 commits August 3, 2026 14:24
…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>
@LauraGPT

LauraGPT commented Aug 3, 2026

Copy link
Copy Markdown
Author

@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 zh/yue/ja/ko, while retaining Parakeet v3 for supported European locales and the compact English default.

The exact PR head is mergeable and all three available GitHub checks pass. Current-main validation completed with 146 huddle tests, Clippy using -D warnings, rustfmt, and real sherpa-onnx 1.13.4 CPU decoding of the official Chinese, English, Japanese, Korean, and Cantonese samples. The 4.608-second Korean sample completed in 0.234 seconds and produced normal Korean text. The model archive is pinned by size and SHA-256, and the FunASR model license is installed beside the downloaded bytes.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Huddle transcription is English-only: non-English speech (e.g. Korean) produces garbled transcripts

2 participants