[Bug]: Clean install cannot import audio_separator — ModuleNotFoundError: No module named 'audioread' (undeclared dependency)

オープン 初心者向け
#325 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
95/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python
領域
build-system

調査の方向性

pyproject.toml から始めます。ランタイム依存関係はここで宣言され、audio_separator/separator/uvr_lib_v5/spec_utils.py と audio_separator/separator/architectures/vr_separator.py のインポートを確認します。audioread を明示的に宣言し、クリーンな環境で pip install --ignore-installed .、続いて python -c "import audio_separator" を実行して検証します。新しいインストールで audioread が解決され、ModuleNotFoundError なしでインポートできれば完了とします。

索引モデルが issue の本文から書いたものです。

説明

  • I have searched and found no existing issues.

Describe the bug

A clean install of audio-separator==0.48.0 cannot be imported at all:

ModuleNotFoundError: No module named 'audioread'

audioread is imported and used at runtime, but it is not declared as a dependency. It used to arrive transitively through librosa, and librosa 1.0 dropped it, so the librosa>=0.10 constraint no longer guarantees its presence.

I confirmed this without installing anything, by resolving a fresh install:

$ pip install --dry-run --ignore-installed --report resolve.json "audio-separator==0.48.0"
$ python -c "import json;d=json.load(open('resolve.json'));p={i['metadata']['name'].lower():i['metadata']['version'] for i in d['install']};print(p.get('librosa'), 'audioread' in p)"
1.0.1 False

So the default resolution today picks librosa 1.0.1 and installs no audioread — the package is broken out of the box, no upgrade step needed.

It is not a dead import

audioread is really used, so removing the import is not the right fix:

  • audio_separator/separator/uvr_lib_v5/spec_utils.py:1 — import audioread, used at line 1332: with audioread.audio_open(audio_file) as f:
  • audio_separator/separator/architectures/vr_separator.py:12 — import audioread, used at line 397

The import chain that triggers it first:

separator/separator.py:27   from audio_separator.separator.ensembler import Ensembler
separator/ensembler.py:3    from audio_separator.separator.uvr_lib_v5 import spec_utils
uvr_lib_v5/spec_utils.py:1  import audioread
Workaround
pip install audioread

After that, import and separation both work normally (verified on 4-stem separation).

Suggested fix

Add it explicitly to dependencies in pyproject.toml, e.g. audioread>=3.0. Because librosa>=1.0 no longer provides it, relying on the transitive path will break for every new install from now on.

Logs

Traceback (most recent call last):
  File "/path/to/site-packages/audio_separator/separator/separator.py", line 27, in <module>
    from audio_separator.separator.ensembler import Ensembler
  File "/path/to/site-packages/audio_separator/separator/ensembler.py", line 3, in <module>
    from audio_separator.separator.uvr_lib_v5 import spec_utils
  File "/path/to/site-packages/audio_separator/separator/uvr_lib_v5/spec_utils.py", line 1, in <module>
    import audioread
ModuleNotFoundError: No module named 'audioread'

Package metadata for 0.48.0 shows no audioread requirement anywhere, including extras:

$ python -c "import importlib.metadata as m;print([r for r in m.requires('audio-separator') if 'audio' in r.lower()])"
['audioop-lts (>=0.2.1) ; python_version >= "3.13" and python_version < "4.0"']

System Info

Operating System: macOS 26.6.2 (arm64, Apple Silicon)
Python version:   3.14.6
audio-separator:  0.48.0 (latest on PyPI, released 2026-10-29)
librosa:          1.0.1
numpy:            2.5.5
torch:            2.15.0 (darwin arm64 wheel)
Install method:   pip in a virtualenv, as a dependency of a desktop app

Additional Information

Found while installing a third-party app that depends on audio-separator[cpu]; the failure is in this package's own dependency metadata, so it should affect any consumer, not just that app.

If 3.14 support is a concern, note requires_python currently allows 3.14.x (!=3.14.1,>=3.10) — but this failure is unrelated to the Python version, it is the missing dependency.

Happy to test a patch release.

主要言語
Python
スター
1.5k
フォーク
216
平均マージ
1時間
マージ済み PR(30日)
2

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

nomadkaraoke/python-audio-separator のほかの issue

nomadkaraoke/python-audio-separator の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。