-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RuntimeError: Expected object of backend CPU but got backend CUDA for argument #4
Comments
No need of Cuda or CuDNN , if you want to run only CPU. |
Thanks! I wanted to run test on GPU version of both fastspeech and squeezewave on Jetson. Resolved this issue. |
Thanks, I had specially made the changes in repo to make it work on CPU , GPU havent tested. |
@alokprasad I was able to merge the code in both fastspeech and squeezewave for testing end-to-end TTS from one application to skip the storing and loading mel spectrogram. The full pipeline was able to synthesize audio from text in 0.5 seconds on Jetson Nano's GPU. CPU implementation I havent tested yet, will let you know once i test it. |
@sujeendran am trying to run this on raspberry pi4 and do some tests.. ... however just needed help with which tts engine did u manage synthesize audio from text.. ? am kind of lost of where to begin with.. do u have a notebook for the same ? |
@varungujjar this repo is using fastspeech ( for generating Features from Text) and Squeezewave as vocoder for generating wav from features generated from fastspeech.. |
@alokprasad thankx a lot for the beginners :D however looking at your fastspeech repo it says u need cuda.. is it also been modified for cpu support aswell ? |
@varungujjar i guess before jumping on TTS you should read about Older TTS implementation( svox PICO ,epeak) and how newer NN based TTS works ( Tacotron2 , Fastspeech ) Understand vocoder...etc.. Regarding repo its just tested for CPU as i wanted to run it embedded board without NVIDIA hardware..CUDA is only for nvidia devices..maybe you need to modify for CUDA support ... |
@alokprasad sure.. i'll check that.. regarding the repo.. yes its exactly wanted to check since my target is to run on cpu .... without nvidia hardrware.. thankx a ton |
@alokprasad Managed to run your squeezewave with cpu vocoder on pi4 4GB: took 16 seconds :) |
@varungujjar good you were able to do so. |
@alokprasad not yet i just managed to compile pytorch after 4 hours first and then just run |
@alokprasad so i managed run both the inferences fastpeech and squeezewave successfully but when i run the wav file its blank .. |
Ok finally got it to work here are the results: Raspberry Pi4 4GB SqueezeWave |
Thanks For Sharing! |
@varungujjar you may see Vocoder takes most of the TIme, So you might spent Some time in optimizing the code to run this faster in Rpi , May be optimized version of Pytorch that runs faster in ARM using Neon Instruction.. |
@alokprasad am actually not an ML guy yet have that learning curve going on.. wouldnt know how to do that.. however i was also wondering if I could use this vocoder with Mozilla tts engine to get better sound output ? is that possible ? |
i would say..Read..learn..dig more..i am also not an ML Guy..:) |
Hi,
Which version of PyTorch , CUDA and cuDNN do you use? I always run into this error.
My setup:
Windows 10 Pro
python 3.6.5
torch 1.1.0
Cuda 10.0
cuDNN 7.6
I tried explicitly setting the device to 'cpu' in synthesis.py and fastspeech.py to try running just on cpu.
![image](https://user-images.githubusercontent.com/30560413/83760099-c208df80-a674-11ea-8225-ba57f103b852.png)
Also tried model.to(device) and also model arguments .to(device). Same issue happens in both FastSpeech and SqueezeWave for me.
Same result on ubuntu 18.04 with python 3.6.9, torch 1.5, cuda 10.2 and cudnn 8!
The text was updated successfully, but these errors were encountered: