asteroid-team / asteroid

The PyTorch-based audio source separation toolkit for researchers
https://asteroid-team.github.io/
MIT License
2.21k stars 419 forks source link

How to use GPU rather than CPU #698

Open SoftologyPro opened 3 months ago

SoftologyPro commented 3 months ago

Hello,

Trying the first example to separate an mp3. ie

from asteroid.models import BaseModel
import soundfile as sf

model = BaseModel.from_pretrained("mpariente/DPRNNTasNet-ks2_WHAM_sepclean")
model.separate("music.mp3",resample=True)

It worked (well worked as in just made 2 distorted versions of the source music without separating anything it seems) but it uses 100% CPU and seems to ignore the GPU. How do I tell it to use the GPU? Thanks.