question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Option "-n tasnet" does not work in new release

See original GitHub issue

🐛 Bug Report

The new release has broken the “-n tasnet” option.

To Reproduce

  1. Install the new release.
  2. Try to run a command with the “-n tasnet” option. This is the specific command that failed for me:

python '-m demucs.separate -d cpu -n tasnet ./input/54929fb09f6be3e5cbc82ec456e952bea6dd70ac.mp3 -o ./output

Expected behavior

The command should separate the input mp3 into a vocals, bass, etc., wav file.

Actual Behavior

Here is my entire log I got back when trying this command:

root@93bbeef08257:/usr/src/app# python -m demucs.separate -d cpu -n tasnet ./input/f884b7fe0188471a4da0bce3c9b9bfdcfa362511.mp3 -o ./output

FATAL: tasnet is neither a single pre-trained model or a bag of models.

Your Environment

I am running demucs with an express server inside a node/python Docker container. I build the container’s image using the following Dockerfile:

FROM nikolaik/python-nodejs:python3.9-nodejs17

# Create app directory
WORKDIR /usr/src/app

RUN apt-get -y update
RUN apt-get -y upgrade

# Install newest ffmpeg via binary build:
RUN wget https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-amd64-static.tar.xz
RUN wget https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-amd64-static.tar.xz.md5
RUN tar xvf ffmpeg-git-amd64-static.tar.xz
RUN mv $(pattern="ffmpeg" && for _dir in *"${pattern}"*; do [ -d "${_dir}" ] && dir="${_dir}" && break; done && echo "${dir}")/ffmpeg $(pattern="ffmpeg" && for _dir in *"${pattern}"*; do [ -d "${_dir}" ] && dir="${_dir}" && break; done && echo "${dir}")/ffprobe /usr/local/bin/

# Install vocals separator:
RUN python3 -m pip install demucs --no-cache-dir

# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY package*.json ./

# Install npm dependencies:
RUN yarn install

# If you are building your code for production:
# RUN npm ci --only=production

# Bundle app source:
COPY . .

EXPOSE 3001
CMD [ "node", "src/express/express.js" ]

That Dockerfile above automatically installs the newest version of demucs. This same command was working fine up until this morning; I had gotten split vocals from it as recently as 8 AM EST.

Installing the old version of demucs, 2.0.3, made this command work again.

I did that by replacing this line…

RUN python3 -m pip install demucs --no-cache-dir

…with this line:

RUN python3 -m pip install demucs==2.0.3 --no-cache-dir

That version change allowed the command with the -n tasnet option to be successfully run.

  • Python and PyTorch version:

Python version is 3.9; not sure what PyTorch is. If you need it I can get you it later, just wanted to drop this ASAP since the new release went out and is in a state of (presumed) hypercare.

  • Operating system and version (desktop or mobile):

MacOS 11.5.1, but, again, this bug got thrown by a python/node build running inside a Docker container. The container’s python version is 3.9; the node version is 17. Please see the following image for more info: nikolaik/python-nodejs:python3.9-nodejs17

  • Hardware (gpu or cpu, amount of RAM etc.):

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
adefossezcommented, Nov 10, 2021

Sorry about that, support for Tasnet was dropped in the latest version. This was an very large rewrite and it was too much work to keep backward compatibility. Feel free to stay at the v2 version if you want to keep using it!

0reactions
mepc36commented, Nov 21, 2021

Great, thanks…closing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Multiple files conversion? #218 - facebookresearch/demucs
Right now, is it possible to process multiple files at once? ... Option "-n tasnet" does not work in new release #219.
Read more >
Conv-TasNet: Surpassing Ideal Time-Frequency Magnitude ...
First, STFT is a generic signal transformation that is not necessarily optimal for speech separation. Second, accurate reconstruction of the phase of the...
Read more >
demucs - Music Source Separation in the Waveform Domain
We provide an implementation of Demucs and Conv-Tasnet for music source separation on the MusDB dataset. They can separate drums, ...
Read more >
Att-TasNet: attending to encodings in time-domain audio ...
The problem of monaural noisy reverberant speech separation is a 1 dimensional additive and convolutive problem for which the microphone signal ...
Read more >
Conv-TasNet: Surpassing Ideal Time–Frequency Magnitude ...
The majority of the previous methods have formulated the separation problem through the time–frequency representation of the mixed signal, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found