Skip to content

feat: ASR model picker, remove RNNoise, bounded buffers, VAD 1s - #5

Merged
mtib merged 1 commit into
mainfrom
feat/asr-model-picker
May 21, 2026
Merged

mtib merged 1 commit into
mainfrom
feat/asr-model-picker

Conversation

@mtib

@mtib mtib commented May 20, 2026

Copy link
Copy Markdown
Owner

Changes

ASR model picker

  • Added ASRModel enum (parakeet / moonshine) to Settings
  • Picker in Options window with radio group; pipeline hot-restarts on Save — no app restart needed
  • SherpaEngine.preloadModel(_:) now configures Parakeet (NeMo transducer + CoreML) or Moonshine Tiny (int8) based on the setting
  • tools/download-sherpa.sh downloads and bundles both models

Remove RNNoise

  • Pipeline now wires MicSource/SystemAudioSource directly, removing the DenoisingAudioSource preprocessing step
  • Parakeet and Silero VAD are robust enough for typical environments without it; saves continuous CPU overhead

Memory leak fix

  • BufferBroadcaster.stream was unbounded by default — while ASR runs synchronously it blocks the VAD loop, letting the audio tap pile up buffers indefinitely
  • Capped at 200 buffers (~2s); oldest are dropped when the consumer falls behind

VAD tuning

  • min_silence_duration reduced from 1.5s → 1.0s — shorter segments, lower per-inference memory and latency

…ence to 1s

- Add Moonshine Tiny as a fast/lightweight ASR alternative to Parakeet
- Model picker in Options; pipeline hot-restarts on save (no app restart needed)
- Remove DenoisingAudioSource (RNNoise) from Pipeline — Parakeet is
  robust enough to not need preprocessing
- Bound AsyncStream in BufferBroadcaster to 200 buffers to prevent
  unbounded memory growth when ASR falls behind real-time audio
- Drop min_silence_duration from 1.5s → 1.0s to reduce segment length
  and improve ASR latency and memory per inference
- Download Moonshine Tiny int8 in tools/download-sherpa.sh and bundle
  it alongside Parakeet in the app

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@mtib
mtib merged commit fed4df8 into main May 21, 2026
1 check passed
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.

1 participant