forge
Explore
Log in

Don't you dare go Hollow

Voiced threshold sweep recorded

Browse files at this commit

6d12ee10719c448574172ab8938401342caa28acAhmet Kaan GümüşParent: 8eefecc
  • docs
    • voiced threshold sweep recorded
    • not the 12k mechanism
Show full message
docs(opus-silkq/r1): voiced threshold sweep recorded; not the 12k mechanism
crates/ec-opus/src/silk_enc.rsmodified+8 -1
@@ -556,6 +556,13 @@ fn ncc(frame: &[f32], lag: usize) -> f32 {
556 /// Coarse (4 kHz-equivalent decimated) search followed by a fine search at556 /// Coarse (4 kHz-equivalent decimated) search followed by a fine search at
557 /// full rate, then a per-subframe refinement and contour-table lookup557 /// full rate, then a per-subframe refinement and contour-table lookup
558 /// against the decoder's own `CB_LAGS_*` tables (`silk.rs:157-176`).558 /// against the decoder's own `CB_LAGS_*` tables (`silk.rs:157-176`).
559+/// Voiced decision: libopus silk_find_pitch_lags starts from 0.6 (minus speech-activity,
560+/// tilt and prev-type terms); value measured on real speech, lane opus-silkq r1.
561+// Sweep 2026-08-23 (reelm 12k SILK-WB, corr/err_ratio): .35 -> .8081/11.4,
562+// .45 -> .8127/26.3, .55 -> .8106/44.8, .65 -> .7987/12.3; err non-monotonic,
563+// threshold is not the 12k mechanism. Kept at .35.
564+const VOICED_THRESHOLD: f32 = 0.35;
565+
559 pub(crate) fn estimate_pitch(566 pub(crate) fn estimate_pitch(
560 frame: &[f32],567 frame: &[f32],
561 fs_khz: i32,568 fs_khz: i32,
@@ -631,7 +638,7 @@ pub(crate) fn estimate_pitch(
631 }638 }
632 }639 }
633 }640 }
634- let voiced = best_score > 0.35;641+ let voiced = best_score > VOICED_THRESHOLD;
635 if !voiced {642 if !voiced {
636 return Some(PitchEstimate {643 return Some(PitchEstimate {
637 voiced: false,644 voiced: false,