Repository navigation
Let ASR VAD chunking load any built-in VAD family - #1096
Merged
Merged
Conversation
ASR models that plan chunks with audio_chunk_mode=vad hard-coded the Silero loader, so <family>.vad_model_path could only name Silero weights. Add runtime::load_vad_model() and use it in moonshine_asr, qwen3_asr, vibevoice_asr, granite5asr, parakeet_tdt, lfm2_audio and sense_asr. - Only loaders that advertise offline VAD are considered, so a wrong path never loads a large non-VAD model first. - For a weight file, the loader that uses exactly that file wins over a package loader that resolves the file to its folder. - A path no VAD loader claims is still loaded as Silero (e.g. Silero weights under another name), after checking it holds Silero tensors; otherwise the error lists the VAD families built into the binary. - Loaders are called directly, leaving the host's load trace and progress bracket alone. Defaults are unchanged. Adds vad_loader_test.
Owner
|
Fixed two things:
|
Owner
|
@Etherll PR merged! Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ASR models that plan chunks with
audio_chunk_mode=vadhard-codedsilero_vad::load_silero_vad_model, so<family>.vad_model_pathcould only name Silero weights. This PR addsruntime::load_vad_model(), which loads any VAD family built into the binary, and uses it in the seven ASR models that hard-coded Silero. Defaults are unchanged: every model still points atassets/framework/models/silero_vad.This was split out of #1095 (Earshot VAD), and the two PRs do not depend on each other. With both merged, Earshot works as an ASR chunking VAD, e.g.
--session-option parakeet_tdt.vad_model_path=assets/framework/models/earshot_vad.What changed
src/framework/runtime/registry.cppandregistry.h: adefault_loaders()refactor, shared withmake_default_registry, plusload_vad_model():The seven models that now use it:
moonshine_asr,qwen3_asr,vibevoice_asr,granite5asr,parakeet_tdt,lfm2_audioandsense_asr. Each change is a one-line swap of the loader call;sense_asr/session.hdrops a now-unused forward declaration.gigaam_asralready loaded its VAD through the registry and is unchanged.Option descriptions in those models' loaders and
model_specs/*.jsonnow say "any built-in VAD family; default Silero VAD". Only description strings change.tests/unittests/test_vad_loader.cpp(vad_loader_test) covers:Against the version without the exact-file rule and the Silero tensor check,
sibling_package_does_not_claim_fileandrejectionsfail.Validation
build_windows.ps1 -Preset windows-cpu-release -RunTests(custom set: the seven ASR models, gigaam_asr, firered_vad, pulsevad)vad_loader_testandaudio_chunking_testpass. 2 other tests fail:lfm2_audio_assets_testanddisk_expert_weight_store_test. They run no VAD code and pass on Linux.ENGINE_BUILD_TESTS=ON, fullctestvad_loader_test,earshot_vad_testandaudio_chunking_testpass.tools/check_loader_catalog_sync.py --self-testandtools/check_loader_catalog_sync.pyboth pass.End to end
The model was Moonshine Streaming tiny Q8_0 on CPU, with
audio_chunk_mode=vadon a 10 min file.moonshine_asr.vad_model_pathassets/framework/models/silero_vad)assets/framework/models/earshot_vad(with #1095)…/earshot_vad.safetensors(with #1095)earshot_vadno VAD model built into this binary can load … (built VAD families: silero_vad, marblenet_vad, firered_vad, pulsevad; loading it as Silero VAD failed: the file has no Silero VAD tensors)With #1095, Parakeet TDT 0.6B v3 Q8_0 on CUDA (Colab L4) ran on 23.7 min of LibriSpeech test-clean: six chapters, each joined into one file with pauses and light noise.
The absolute WER is high for every row because of how the long-form files were built; compare the rows with each other. These runs used the first version of this helper, before the exact-file rule; a directory path such as
assets/framework/models/earshot_vadtakes the same route in both. On an RTX 5090, the VAD pass over 10 min of 5 dB SNR audio took 79 ms with Earshot and 4.9 s with Silero.Known limitations
granite5asrstill runs VAD only whenvad_model_pathnames a regular file. That behaviour is unchanged.