Python spleeterのインストール

提供:yonewiki
2023年1月9日 (月) 09:41時点におけるYo-net (トーク | 投稿記録)による版 (→‎概要)

Pythonに戻る

4年前くらいのログ

 spleeterをインストールしたときのログです。

(py36) PS C...> conda install -c conda-forge spleeter                                  
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: done


==> WARNING: A newer version of conda exists. <==
  current version: 4.8.3
  latest version: 4.9.2

Please update conda by running

    $ conda update -n base -c defaults conda



## Package Plan ##

  environment location: C:\ProgramData\Anaconda3\envs\jupyter

  added / updated specs:
    - spleeter


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    _tflow_select-2.2.0        |            eigen           3 KB
    decorator-4.4.2            |             py_0          11 KB  conda-forge
    importlib-metadata-2.0.0   |             py_1          28 KB  conda-forge
    importlib_metadata-2.0.0   |                1           3 KB  conda-forge
    python-dateutil-2.8.1      |             py_0         220 KB  conda-forge
    python_abi-3.6             |          1_cp36m           4 KB  conda-forge
    tensorflow-1.15.0          |eigen_py36h932cce6_0           4 KB
    typing-extensions-3.7.4.3  |                0           8 KB  conda-forge
    yarl-1.6.3                 |   py36h68aa20f_0         134 KB  conda-forge
    ------------------------------------------------------------
                                           Total:         414 KB

The following NEW packages will be INSTALLED:

  _tflow_select      pkgs/main/win-64::_tflow_select-2.2.0-eigen
  absl-py            conda-forge/win-64::absl-py-0.10.0-py36h9f0ad1d_1
  aiohttp            conda-forge/win-64::aiohttp-3.7.2-py36h779f372_0
  appdirs            conda-forge/noarch::appdirs-1.4.4-pyh9f0ad1d_0
  astor              conda-forge/noarch::astor-0.8.1-pyh9f0ad1d_0
  async-timeout      conda-forge/noarch::async-timeout-3.0.1-py_1000
  attrs              conda-forge/noarch::attrs-20.3.0-pyhd3deb0d_0
  audioread          conda-forge/win-64::audioread-2.1.8-py36h9f0ad1d_3
  blinker            conda-forge/noarch::blinker-1.4-py_1
  brotlipy           conda-forge/win-64::brotlipy-0.7.0-py36hc753bc4_1001
  ca-certificates    conda-forge/win-64::ca-certificates-2020.11.8-h5b45459_0
  cached-property    conda-forge/noarch::cached-property-1.5.1-py_0
  cachetools         conda-forge/noarch::cachetools-4.1.1-py_0
  cffi               conda-forge/win-64::cffi-1.14.3-py36h2e103f8_1
  chardet            conda-forge/win-64::chardet-3.0.4-py36hd36e781_1008
  click              conda-forge/noarch::click-7.1.2-pyh9f0ad1d_0
  cryptography       conda-forge/win-64::cryptography-3.2.1-py36he58ceb7_0
  cycler             conda-forge/noarch::cycler-0.10.0-py_2
  decorator          conda-forge/noarch::decorator-4.4.2-py_0
  ffmpeg             conda-forge/win-64::ffmpeg-4.3.1-ha925a31_0
  ffmpeg-python      conda-forge/noarch::ffmpeg-python-0.2.0-py_0
  freetype           conda-forge/win-64::freetype-2.10.4-h546665d_0
  future             conda-forge/win-64::future-0.18.2-py36ha15d459_2
  gast               conda-forge/noarch::gast-0.2.2-py_0
  google-auth        conda-forge/noarch::google-auth-1.23.0-pyhd8ed1ab_0
  google-auth-oauth~ conda-forge/noarch::google-auth-oauthlib-0.4.1-py_2
  google-pasta       conda-forge/noarch::google-pasta-0.2.0-pyh8c360ce_0
  grpcio             conda-forge/win-64::grpcio-1.33.2-py36h4374274_2
  h5py               conda-forge/win-64::h5py-3.1.0-nompi_py36hf359dfe_100
  hdf5               conda-forge/win-64::hdf5-1.10.6-nompi_h89124ea_1110
  idna               conda-forge/noarch::idna-2.10-pyh9f0ad1d_0
  idna_ssl           conda-forge/win-64::idna_ssl-1.1.0-py36h9f0ad1d_1001
  importlib-metadata conda-forge/noarch::importlib-metadata-2.0.0-py_1
  importlib_metadata conda-forge/noarch::importlib_metadata-2.0.0-1
  importlib_resourc~ conda-forge/win-64::importlib_resources-3.3.0-py36ha15d459_0
  intel-openmp       conda-forge/win-64::intel-openmp-2020.3-h57928b3_311
  joblib             conda-forge/noarch::joblib-0.17.0-py_0
  jpeg               conda-forge/win-64::jpeg-9d-h8ffe710_0
  keras-applications conda-forge/noarch::keras-applications-1.0.8-py_1
  keras-preprocessi~ conda-forge/noarch::keras-preprocessing-1.1.0-py_0
  kiwisolver         conda-forge/win-64::kiwisolver-1.3.1-py36he95197e_0
  krb5               conda-forge/win-64::krb5-1.17.1-hc04afaa_3
  libblas            conda-forge/win-64::libblas-3.8.0-20_mkl
  libcblas           conda-forge/win-64::libcblas-3.8.0-20_mkl
  libcurl            conda-forge/win-64::libcurl-7.71.1-h4b64cdc_8
  libflac            conda-forge/win-64::libflac-1.3.3-h6538335_0
  liblapack          conda-forge/win-64::liblapack-3.8.0-20_mkl
  libogg             conda-forge/win-64::libogg-1.3.2-hfa6e2cd_1002
  libpng             conda-forge/win-64::libpng-1.6.37-h1d00b33_2
  libprotobuf        conda-forge/win-64::libprotobuf-3.13.0.1-h200bbdf_0
  librosa            conda-forge/noarch::librosa-0.8.0-pyh9f0ad1d_0
  libsndfile         conda-forge/win-64::libsndfile-1.0.29-ha925a31_0
  libssh2            conda-forge/win-64::libssh2-1.9.0-hb06d900_5
  libtiff            conda-forge/win-64::libtiff-4.1.0-hc10be44_6
  libvorbis          conda-forge/win-64::libvorbis-1.3.7-ha925a31_0
  llvmlite           conda-forge/win-64::llvmlite-0.34.0-py36hefa7ec1_2
  lz4-c              conda-forge/win-64::lz4-c-1.9.2-h62dcd97_2
  m2w64-gcc-libgfor~ pkgs/msys2/win-64::m2w64-gcc-libgfortran-5.3.0-6
  m2w64-gcc-libs     pkgs/msys2/win-64::m2w64-gcc-libs-5.3.0-7
  m2w64-gcc-libs-co~ pkgs/msys2/win-64::m2w64-gcc-libs-core-5.3.0-7
  m2w64-gmp          pkgs/msys2/win-64::m2w64-gmp-6.1.0-2
  m2w64-libwinpthre~ pkgs/msys2/win-64::m2w64-libwinpthread-git-5.0.0.4634.697f757-2
  markdown           conda-forge/noarch::markdown-3.3.3-pyh9f0ad1d_0
  matplotlib-base    conda-forge/win-64::matplotlib-base-3.3.3-py36h1abdf75_0
  mkl                pkgs/main/win-64::mkl-2020.2-256
  msys2-conda-epoch  pkgs/msys2/win-64::msys2-conda-epoch-20160418-1
  multidict          conda-forge/win-64::multidict-4.7.5-py36h779f372_2
  norbert            conda-forge/noarch::norbert-0.2.1-py_0
  numba              conda-forge/win-64::numba-0.51.2-py36hd7f5668_0
  numpy              conda-forge/win-64::numpy-1.19.4-py36hd1b969e_1
  oauthlib           conda-forge/noarch::oauthlib-3.0.1-py_0
  olefile            conda-forge/noarch::olefile-0.46-pyh9f0ad1d_1
  openssl            conda-forge/win-64::openssl-1.1.1h-he774522_0
  opt_einsum         conda-forge/noarch::opt_einsum-3.3.0-py_0
  packaging          conda-forge/noarch::packaging-20.4-pyh9f0ad1d_0
  pandas             conda-forge/win-64::pandas-1.1.4-py36he38d939_0
  pillow             conda-forge/win-64::pillow-8.0.1-py36ha0524ae_0
  pooch              conda-forge/noarch::pooch-1.2.0-py_0
  protobuf           conda-forge/win-64::protobuf-3.13.0.1-py36h003fed8_1
  pyasn1             conda-forge/noarch::pyasn1-0.4.8-py_0
  pyasn1-modules     conda-forge/noarch::pyasn1-modules-0.2.7-py_0
  pycparser          conda-forge/noarch::pycparser-2.20-pyh9f0ad1d_2
  pyjwt              conda-forge/noarch::pyjwt-1.7.1-py_0
  pyopenssl          conda-forge/noarch::pyopenssl-19.1.0-py_1
  pyparsing          conda-forge/noarch::pyparsing-2.4.7-pyh9f0ad1d_0
  pyreadline         conda-forge/win-64::pyreadline-2.1-py36h9f0ad1d_1002
  pysocks            conda-forge/win-64::pysocks-1.7.1-py36hd36e781_2
  pysoundfile        conda-forge/noarch::pysoundfile-0.10.2-py_1001
  python-dateutil    conda-forge/noarch::python-dateutil-2.8.1-py_0
  python_abi         conda-forge/win-64::python_abi-3.6-1_cp36m
  pytz               conda-forge/noarch::pytz-2020.4-pyhd8ed1ab_0
  requests           conda-forge/noarch::requests-2.25.0-pyhd3deb0d_0
  requests-oauthlib  conda-forge/noarch::requests-oauthlib-1.3.0-pyh9f0ad1d_0
  resampy            conda-forge/noarch::resampy-0.2.2-py_0
  rsa                conda-forge/noarch::rsa-4.6-pyh9f0ad1d_0
  scikit-learn       conda-forge/win-64::scikit-learn-0.23.2-py36h63cef00_2
  scipy              conda-forge/win-64::scipy-1.5.3-py36h7ff6e69_0
  six                conda-forge/noarch::six-1.15.0-pyh9f0ad1d_0
  spleeter           conda-forge/win-64::spleeter-1.5.3-py36h9f0ad1d_2
  tensorboard        conda-forge/noarch::tensorboard-2.4.0-pyhd8ed1ab_0
  tensorboard-plugi~ conda-forge/noarch::tensorboard-plugin-wit-1.7.0-pyh9f0ad1d_0
  tensorflow         pkgs/main/win-64::tensorflow-1.15.0-eigen_py36h932cce6_0
  tensorflow-base    pkgs/main/win-64::tensorflow-base-1.15.0-eigen_py36h07d2309_0
  tensorflow-estima~ pkgs/main/noarch::tensorflow-estimator-1.15.1-pyh2649769_0
  termcolor          conda-forge/noarch::termcolor-1.1.0-py_2
  threadpoolctl      conda-forge/noarch::threadpoolctl-2.1.0-pyh5ca1d4c_0
  tk                 conda-forge/win-64::tk-8.6.10-he774522_1
  tornado            conda-forge/win-64::tornado-6.1-py36h68aa20f_0
  typing-extensions  conda-forge/noarch::typing-extensions-3.7.4.3-0
  typing_extensions  conda-forge/noarch::typing_extensions-3.7.4.3-py_0
  urllib3            conda-forge/noarch::urllib3-1.25.11-py_0
  werkzeug           conda-forge/noarch::werkzeug-0.16.1-py_0
  win_inet_pton      conda-forge/win-64::win_inet_pton-1.1.0-py36h9f0ad1d_1
  wrapt              conda-forge/win-64::wrapt-1.12.1-py36h68a101e_1
  xz                 conda-forge/win-64::xz-5.2.5-h62dcd97_1
  yarl               conda-forge/win-64::yarl-1.6.3-py36h68aa20f_0
  zipp               conda-forge/noarch::zipp-3.4.0-py_0
  zstd               conda-forge/win-64::zstd-1.4.5-h1f3a1b7_2

The following packages will be UPDATED:

  certifi            pkgs/main/noarch::certifi-2020.6.20-p~ --> conda-forge/win-64::certifi-2020.11.8-py36ha15d459_0


Proceed ([y]/n)? y

Preparing transaction: done
Verifying transaction: done
Executing transaction: done
(py36) PS C...>

こんな感じです。

(base) PS C:\.....>conda create -n py36 python=3.6 -y
(py36) PS C:\.....>conda activate py36
(py36) PS C:\.....>git clone https://github.com/deezer/spleeter
(py36) PS C:\.....>conda install -c conda-forge spleeter
(py36) PS C:\.....>spleeter separate -i C:\mp3\music.mp3 -o Output -p spleeter:2stems
INFO:spleeter:Downloading model archive https://github.com/deezer/spleeter/releases/download/v1.4.0/2stems.tar.gz
INFO:spleeter:Validating archive checksum
INFO:spleeter:Extracting downloaded 2stems archive
INFO:spleeter:2stems model file(s) extracted
INFO:spleeter:File Output/music/accompaniment.wav written succesfully
INFO:spleeter:File Output/music/vocals.wav written succesfully
(py36) PS C:\.....>spleeter separate -i C:\mp3\music.mp3 -o Output -p spleeter:4stems
INFO:spleeter:Downloading model archive https://github.com/deezer/spleeter/releases/download/v1.4.0/4stems.tar.gz
INFO:spleeter:Validating archive checksum
INFO:spleeter:Extracting downloaded 4stems archive
INFO:spleeter:4stems model file(s) extracted
INFO:spleeter:File Output/music/drums.wav written succesfully
INFO:spleeter:File Output/music/bass.wav written succesfully
INFO:spleeter:File Output/music/other.wav written succesfully
INFO:spleeter:File Output/music/vocals.wav written succesfully
(py36) PS C:\.....>spleeter separate -i C:\mp3\music.mp3 -o C:/mp3/music/5Stem/ -p spleeter:5stems
INFO:spleeter:Downloading model archive https://github.com/deezer/spleeter/releases/download/v1.4.0/5stems.tar.gz
INFO:spleeter:Validating archive checksum
INFO:spleeter:Extracting downloaded 5stems archive
INFO:spleeter:5stems model file(s) extracted
INFO:spleeter:File C:/mp3/music/5Stem/music/bass.wav written succesfully
INFO:spleeter:File C:/mp3/music/5Stem/music/vocals.wav written succesfully
INFO:spleeter:File C:/mp3/music/5Stem/music/drums.wav written succesfully
INFO:spleeter:File C:/mp3/music/5Stem/music/piano.wav written succesfully
INFO:spleeter:File C:/mp3/music/5Stem/music/other.wav written succesfully
(py36) PS C:\.....>

 上記のようにして使えますが、2Stemはかなり分離できていると思います。歌だけの方はくっきりと抜き出せていて、伴奏には少し歌声が残っている感じ、歌詞はほぼ聞き取れない。メロディーがうっすら少し感じれるので、本物の生バンドよりは、カラオケ寄りかもしれない。生バンドが0、カラオケが1としたら、歌のメロディーは0.05くらいですね。まぁこれだけで歌うのは結構、難しいです。


 4Stemでのドラムはハイハットが無いので、意味ない感じはある。でもハイハット無しリズムを勉強するには、いいのかもしれない。ドラムをやったことないので、ハイハット・シンバルなしの練習が意味があるのかわからないです。一人でのリズムを鍛えるにはありなのかな。多少は自分が目指すべきリズム感をイメージしやすいかもしれない。Baseは割かし抜き出せているので勉強になると思う。


 5StemでのOtherにギターが残っているのかもしれないけど、他の音もいっぱい残っているので、もう少し頑張って欲しいなぁって思う所です。


 ピアノはバンドの中でなっている場合は、かなり聞き取れない。音が小さい。最初から、そういうアクセント的な扱いなので仕方ないのかもしれない。頑張っている割には全体にはあまり影響が及んでいないと思うと弾いてる人はやりがいを感じれないかもしれない。シンセ音は抽出はできていないと思う。

Pythonに戻る