Add SILK VAD (voice activity detection)#155
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #155 +/- ##
==========================================
+ Coverage 88.19% 88.40% +0.20%
==========================================
Files 34 35 +1
Lines 7868 8010 +142
==========================================
+ Hits 6939 7081 +142
Misses 703 703
Partials 226 226
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
FrantaBOT
approved these changes
Jul 20, 2026
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.
Description
ports the SILK voice activity detector: speech activity estimation (VAD.c's silk_VAD_GetSA_Q8), the per-band noise-level tracker (silk_VAD_GetNoiseLevels), the 2-band analysis filter bank (ana_filt_bank_1.c), and the pitch-adaptive high-pass cutoff (HP_variable_cutoff.c). Only depends on the math primitives from #153, nothing else
went through it function by function against the real C source and it lines up exactly — every constant, shift and branch. the first test pass left a few branches uncovered though: the high-energy division path in the SNR ratio calc, the mid-power-level scaling branch, and the decreasing-pitch case in the cutoff adaptation. one of those (the mid-power branch) needed a specific amplitude to land in — ended up temporarily instrumenting the function with a print statement to see the actual internal value across a few amplitudes, found one that lands there reliably, then pulled the print back out. all five functions are at 100% now
Reference issue
part of the SILK encoder series (#147)