neonbjb / tortoise-tts

A multi-voice TTS system trained with an emphasis on quality
Apache License 2.0
13.15k stars 1.82k forks source link

libtorchaudio.pyd not found when trying to use tortoise. #298

Open MancV21 opened 1 year ago

MancV21 commented 1 year ago

Hi. I've followed the installation instructions and everything seemed to install OK, however when I use the command

python tortoise/do_tts.py --text "I'm going to speak this" --voice random --preset fast

I get the error

FileNotFoundError: Could not find module 'C:\Users\USERNAME\AppData\Local\Programs\Python\Python310\Lib\site-packages\torchaudio\lib\libtorchaudio.pyd' (or one of its dependencies). Try using the full path with constructor syntax.

The file IS in that location, I've checked, but it can't find it when running the command. I've installed pysoundfile as the instructions mentions. Anyone know how to fix this?

Thanks.

plincter10 commented 1 year ago

When creating your environment use python 9, not 10. Mine showed as installed also but you have to specify 9 and it worked for me. If you don't it won't use your Nvidia card, just the CPU. It took me 5 hours to generate 3 sentences with my CPU. Create your environment with 9 and put all your files inside there. I used Miniconda and tried Anaconda Navigator gui. The gui is good for a few things, like creating and removing environments.

Divyesh-Nakrani commented 1 year ago

When creating your environment use python 9, not 10. Mine showed as installed also but you have to specify 9 and it worked for me. If you don't it won't use your Nvidia card, just the CPU. It took me 5 hours to generate 3 sentences with my CPU. Create your environment with 9 and put all your files inside there. I used Miniconda and tried Anaconda Navigator gui. The gui is good for a few things, like creating and removing environments.

Sir same issue face i also have python 3.9 still i am getting same issue, can you please solved issue for me

imb101 commented 1 year ago

i had the same issue, boiled down to a torch / torchaudio mismatch. Suggest you uninstall both packages and install the latest whl versions from https://download.pytorch.org/whl/torchaudio/ and https://download.pytorch.org/whl/torch/.

Just for clarity i removed both packages, did a pip install of the torchaudio 2.0.2.cp310.cu117 and then torch 2.0.1.cp10.cu117. works fine now.

lamegaton commented 1 year ago

Thanks @imb101, basic pip uninstall torchaudio and pip install torchaudio work for me

manmay-nakhashi commented 1 year ago

Try setting up with conda

parkeunsang commented 9 months ago

Thanks @imb101, basic pip uninstall torchaudio and pip install torchaudio work for me

It worked for me. thanks(I used also python 3.9)

willbeez commented 4 months ago

I just navigated to Python\Python312\Lib\site-packages\torchaudio\lib and removed the _ prefix on torchaudio.pyd. Maybe there's a reason that the underscore was there?