Add SILK pitch analysis core#158
Merged
Merged
Conversation
Co-authored-by: François Allais <francois.allais@hotmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #158 +/- ##
==========================================
+ Coverage 88.57% 88.91% +0.34%
==========================================
Files 38 39 +1
Lines 8252 8506 +254
==========================================
+ Hits 7309 7563 +254
Misses 712 712
Partials 231 231
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:
|
This was referenced Jul 21, 2026
FrantaBOT
approved these changes
Jul 22, 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
adds
pitchAnalysisCore— the two-stage pitch estimator (silk_pitch_analysis_core_FLP): a coarse search at 4 kHz over the full lag range, followed by a refined search at 8 kHz (and, for 16 kHz input, a stage-3 refinement back in the original signal) using the codebook tables inpitch_est_tables.c. Also includes the two escape paths (low first-stage correlation, no codebook candidate above threshold) and the previous-lag continuity bias that favors sticking with the prior frame's pitchported from
pitch_analysis_core_FLP.candpitch_est_tables.c/pitch_est_defines.hleft
find_pitch_lags.goout of this one even though the original split plan grouped it here — it's a method on*Encoder(needspreviousLag,ltpCorr, etc.), and that type doesn't exist in this package yet. Moving it to land alongsidefind_pred_coefs.go, once there's an encoder to hang it off ofone scope note carried over from the original code: only 8 and 16 kHz are handled today (12 kHz needs
resamplerDown2_3, which isn't ported yet) — this matches the upstream file as-is, not something reduced during the splitReference issue
part of the SILK encoder series (#157)