Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion requirements-runtime.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ torch>=2.0
torchaudio>=2.0
numpy>=1.24
scipy>=1.10
librosa>=0.10
# <0.11: pyin's voiced decision changed in 0.11 (white noise scores ~0.43
# voiced vs 0.0 on 0.10), which silently shifts the calibrated multi-speaker
# voicing gates (multi_speaker_merge_voiced_min et al). Re-calibrate before
# raising this bound.
librosa>=0.10,<0.11
soundfile>=0.12

# Web
Expand Down
4 changes: 2 additions & 2 deletions requirements.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"backend": {
"requirements_runtime": {
"path": "requirements-runtime.txt",
"sha256": "a2e2fc3c1448ddd6b1caf661daa56a6b37086c36aba586b4e3a2f29a0a916133",
"line_count": 31
"sha256": "c013d714111e1198048b2a47bbdf7a05b706ae5e5cb05f3686877ed957726f56",
"line_count": 32
},
"frontend_lock": {
"path": "frontend/package-lock.json",
Expand Down
4 changes: 4 additions & 0 deletions src/auto_voice/inference/singing_conversion_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ def _voiced_fraction(audio: np.ndarray, sample_rate: int, max_s: float = 20.0) -
(calibrated leads: 0.76-0.87); harmony stacks / textures it would butcher
score low (calibrated: 0.14-0.51). Measured on up to ``max_s`` of active
audio with pyin fmin=80 fmax=1000, matching the calibration convention.

Calibration is coupled to librosa 0.10 pyin semantics (0.11 changed the
voiced decision: white noise jumps from 0.0 to ~0.43) — hence the
``librosa<0.11`` bound in requirements-runtime.txt.
"""
import librosa

Expand Down
3 changes: 2 additions & 1 deletion tests/test_fork_hq_lane.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ def infer(self, audio, spk, emb, sr):

monkeypatch.setattr(p, "_get_separator", lambda: FakeSep())
monkeypatch.setattr(p, "_get_model_manager", lambda: FakeMM())
monkeypatch.setattr(p, "_extract_pitch", lambda a, sr: np.zeros(8, np.float32))
monkeypatch.setattr(p, "_extract_pitch",
lambda a, sr, method=None: np.zeros(8, np.float32))
Comment on lines +36 to +37

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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!


res = p._convert_song_fork_hq(str(song), "prof-1", 1.0, 0.9, True, "balanced", 0.0)

Expand Down
Loading