Pin librosa <0.11 to protect voicing-gate calibration; fix fork HQ lane test stub - #2
Pin librosa <0.11 to protect voicing-gate calibration; fix fork HQ lane test stub#2KhryptorGraphics wants to merge 2 commits into
Conversation
librosa 0.11 changed pyin's voiced decision: white noise scores ~0.43 voiced fraction vs 0.0 on 0.10.x (probed on both versions). Every multi-speaker routing gate (multi_speaker_merge_voiced_min and friends, calibrated leads 0.76-0.87 vs keep-cases 0.14-0.51) was calibrated on 0.10 semantics, so an environment resolving librosa>=0.10 to 0.11 gets a silently mis-calibrated router (and a failing test_multi_speaker_routing noise test). Bound the requirement to the calibrated major, note the coupling in _voiced_fraction, and refresh the requirements-runtime hash in the dependency contract lock (line_count follows the checker's runtime_requirement_count, now 32). Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_01Vqqhm9yzsrG7rgmiMrBjC1
The quality-tiers change made _convert_song_fork_hq pass method=q['f0_method'] to _extract_pitch, but the test's monkeypatched lambda still had the old (audio, sr) signature, so test_fork_hq_lane_is_stereo_and_mirrors_contract failed at HEAD with a TypeError. Mirror the real signature's optional kwarg in the stub. Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_01Vqqhm9yzsrG7rgmiMrBjC1
|
Seems you are using me but didn't get OPENAI_API_KEY seted in Variables/Secrets for this repo. you could follow readme for more information |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThe PR protects multi-speaker routing behavior by pinning librosa to the pyin semantics used during calibration, documenting and locking that dependency contract, and fixes the fork HQ lane test stub to accept the new pitch-extraction keyword argument. Sequence diagram for the fork HQ lane pitch extraction testsequenceDiagram
participant T as test_fork_hq_lane_is_stereo_and_mirrors_contract
participant C as _convert_song_fork_hq
participant E as _extract_pitch
T->>C: invoke fork HQ conversion
C->>E: _extract_pitch(audio, sr, method=q['f0_method'])
E-->>C: pitch result
C-->>T: stereo conversion result
Flow diagram for librosa calibration protectionflowchart LR
R["requirements-runtime.txt: librosa>=0.10,<0.11"] --> P["librosa 0.10 pyin semantics"]
P --> V["_voiced_fraction"]
V --> G["Multi-speaker routing gates"]
U["librosa 0.11"] --> W["Changed voiced decision"]
W --> M["Mis-calibrated routing"]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Greptile SummaryThe PR protects calibrated multi-speaker voicing gates by constraining librosa to its 0.10 behavior and updates the HQ-lane test stub for the current pitch-extraction signature.
Confidence Score: 4/5The PR appears safe to merge, with one non-blocking test-strengthening opportunity around HQ pitch-method forwarding. The dependency constraint is consistently integrated and the production behavior is unchanged; the only accepted concern is that the revised stub can conceal a future loss of the Files Needing Attention: tests/test_fork_hq_lane.py Important Files Changed
Reviews (1): Last reviewed commit: "fix: accept method kwarg in fork HQ lane..." | Re-trigger Greptile |
| monkeypatch.setattr(p, "_extract_pitch", | ||
| lambda a, sr, method=None: np.zeros(8, np.float32)) |
There was a problem hiding this comment.
Pitch forwarding remains untested
The updated stub accepts but ignores method, and this test does not configure an f0_method. It will therefore still pass if the HQ lane stops forwarding a selected pitch-extraction method. Exercise a non-None override and assert the received argument so this routing contract is protected.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Two fixes found while auditing the multi-speaker conversion path.
1. Pin
librosa>=0.10,<0.11(762f0b7)librosa 0.11 changed pyin's voiced decision: white noise scores ~0.43 voiced fraction on 0.11 vs 0.0 on 0.10.2 (probed on both versions). Every multi-speaker routing gate —
multi_speaker_merge_voiced_minand friends, calibrated on leads 0.76–0.87 vs keep-cases 0.14–0.51 — was measured on 0.10 semantics. With the previous open bound (librosa>=0.10), any fresh install, CI run, or redeploy resolving to 0.11 gets a silently mis-calibrated router and a failingtest_multi_speaker_routingnoise test.requirements-runtime.txt: bound to>=0.10,<0.11with a comment saying re-calibrate before raising it_voiced_fractiondocstring: notes the calibration couplingrequirements.lock: refreshed sha256 +line_count(follows the checker'sruntime_requirement_count, now 32);scripts/check_dependency_contract.pypasses with no errors2. Fix
test_fork_hq_lanestub signature (a4b67eb)The quality-tiers change (
8ad0500) made_convert_song_fork_hqcall_extract_pitch(..., method=q['f0_method']), but the test's monkeypatched lambda kept the old(audio, sr)signature, sotest_fork_hq_lane_is_stereo_and_mirrors_contractfailed at HEAD with a TypeError. The stub now mirrors the real signature's optional kwarg.Verification
test_separation_bridge+test_multi_speaker_routing+test_svc_fork_bridge: 71/71 pass under librosa 0.10.2test_fork_hq_lane+test_web_conversion_metadata+test_conversion_workflow_api: 16/16 passscripts/check_dependency_contract.py: no errorscd frontend && npm run build: cleanautovoice-thorconda env🤖 Generated with claude-flow
https://claude.ai/code/session_01Vqqhm9yzsrG7rgmiMrBjC1
Generated by Claude Code
Summary by Sourcery
Preserve multi-speaker routing calibration across installations and restore fork HQ lane test compatibility.
Bug Fixes:
Build: