Skip to content

Restore samplerate dependency -- broke VR separation on Linux/Windows - #15

Merged
dotdevdotdev merged 1 commit into
masterfrom
fix-samplerate
Sep 6, 2026
Merged

dotdevdotdev merged 1 commit into
masterfrom
fix-samplerate

Conversation

@dotdevdotdev

Copy link
Copy Markdown
Owner

Progresses #1 -- the CI added in #13/#14 just caught its first real Linux-specific bug.

`vr_auto` and `vr_cpu` failed on ubuntu-latest with `ModuleNotFoundError: No module named 'samplerate'`, lazily raised from inside librosa's `resample()`.

librosa lazily imports the `samplerate` package for several `res_type` values, including the VR-arch model params' default. `separate.py` forces `'polyphase'` (scipy-backed, no samplerate needed) specifically on Apple Silicon (see the ARM check at separate.py:1207/1544) -- which is exactly why this was invisible when the original dependency modernization (#5) was tested only on macOS, and why grepping our own code for `import samplerate` (which correctly found nothing direct) wasn't sufficient: it's a transitive runtime dependency triggered by a parameter value, not a direct import in our code.

Restored `samplerate` to requirements.txt with a comment explaining why, so it doesn't get grep-and-removed again by a future cleanup pass.

This is a good demonstration of exactly why #13's CI is worth having.

Built by dotdev.dev

The CI added in #13/#14 just caught its first real bug: vr_auto and
vr_cpu failed on ubuntu-latest with
  ModuleNotFoundError: No module named 'samplerate'
lazily raised from inside librosa.resample().

librosa's resample() lazily imports the `samplerate` package for
several res_type values, including the VR-arch model params' default.
separate.py forces 'polyphase' (scipy-backed, no samplerate needed)
on Apple Silicon specifically (see the ARM check in
separate.py:1207/1544), which is why this was invisible when the
original dependency modernization was tested only on macOS -- and why
grepping our own code for direct `import samplerate` (which found
nothing) wasn't sufficient: it's a transitive runtime dependency
triggered by a parameter value, not a direct import.

Restored `samplerate` to requirements.txt with an explanatory comment
so it doesn't get grep-and-removed again.

Built by dotdev.dev
Claude-Session: https://claude.ai/code/session_01LjMNiTr56yH2jqLheNSdS8
@dotdevdotdev
dotdevdotdev merged commit c53459a into master Sep 6, 2026
3 checks passed
@dotdevdotdev
dotdevdotdev deleted the fix-samplerate branch September 6, 2026 01:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant