0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

uvでdemucsをインストールして音源分離

Last updated at Posted at 2025-06-23

概要

uvでdemucsをインストールして音源分離しました。
少し手間取ったので要点をメモします。

環境

% sw_vers
ProductName:		macOS
ProductVersion:		14.7.4
BuildVersion:		23H420
% uv run python -V
Python 3.11.2 

手順

# 作業用dirの作成
mkdir vocalsep
cd vocalsep
# uv初期化
uv init
# torch追加。最新版はaddできないため2.2をadd
uv add "torch<2.3"
# numpy追加。demucsとの相性により1系をadd。
uv add "numpy<2.0"
# demucs追加
uv add demucs
# 音源分離の実行(ボーカルとそれ以外)
uv run demucs --two-stems=vocals {input_wav_path}

音源分離が完了すると./separated/htdemucs/FILENAMEフォルダにno_vocals.wav, vocals.wavが作成されます。

解説

  • uv addは2.2以下のバージョンでないとインストールできません。demucsは2.2で動くため、2.2をインストールすればよいです。
  • demucsはnumpy 2系だと動かないためnumpy 1系をインストールする必要があります。
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?