ModuleNotFoundError: No module named 'soundfile'
The Application will not start. I received this output:
C:\Users{ }\MusicGen\audiocraft>python app.py
Traceback (most recent call last):
File "C:\Users{ }\MusicGen\audiocraft\app.py", line 12, in
Same Error running the application in a virtual environment and the host environment.
looks like installation error
i would directly install into drive not into c users
i have a step by step workflow here : https://youtu.be/v-YpvPkhdO4
The error message you received indicates that the module 'soundfile' is not installed in your Python environment. The 'soundfile' module is likely a dependency of your application, and it needs to be installed for your application to work properly.
To resolve this issue, you can follow these steps:
-
Make sure you have the correct version of Python installed. Check that the version of Python you are using matches the requirements of your application.
-
Activate your virtual environment if you are using one. Run the appropriate command based on your operating system to activate the virtual environment. For example, on Windows, you can use the command:
venv\Scripts\activate -
Install the 'soundfile' module in your Python environment. Open a command prompt or terminal, and use the following command:
pip install soundfileThis command will download and install the 'soundfile' module from the Python Package Index (PyPI).
-
After the installation is complete, try running your application again:
python app.pyThe 'soundfile' module should now be found, and your application should start without the previous error.
If you're still encountering issues, ensure that all the necessary dependencies for your application are installed correctly. You may need to check the documentation or requirements file for your application to determine the complete list of dependencies and install them accordingly.
I installed it manually, so perhaps that's why I didn't have this issue.
Assuming that you installed the package properly, I suspect that requirements.txt should add soundfile since torchaudio requires it on windows systems.
As the comment above suggests, just installing it (be mindful of any virtual environments) would be enough.
If you have more problems you can check the setup scripts that are compatible with this project: https://github.com/rsxdalv/one-click-installers-tts/blob/main/webui.py#LL59C14-L59C35
I had the same error except it was MusicGen not soundfile. It was a little weird cause I didn't have this problem with 0.0.1.
Installing MusicGen did not solve this problem:
Successfully installed MusicGen-0.0.1 jsonpickle-3.0.1 more-itertools-9.1.0 music21-8.3.0 webcolors-1.13 youtube-dl-2021.12.17
C:\ai\AudioCraft>python app.py
Traceback (most recent call last):
File "C:\ai\AudioCraft\app.py", line 14, in
You might have installed https://pypi.org/project/musicgen/ which is completely unrelated except by name. Sounds like a separate problem, did you run pip install audiocraft?
I too am having this issue, I've also installed and uninstalled soundfile multiple times to no avail. It's really got me puzzled. Since i can clearly see the module in the site-packages folder, but it still doesn't detect that it's there.
Also when I reinstalled audiocraft and ran pip install -e . it shows this:
Requirement already satisfied: soundfile>=0.10.2 in c:\users\daydr\miniconda3\lib\site-packages (from librosa->audiocraft==0.0.2a1) (0.12.1)
I'm at a loss. ¯|-(ツ)-|¯
Edit: I found after banging my head against the keyboard and monitor for what seemed like a week. I found that for some reason it's not seeing the files inside the "site-packages" folder but instead is looking for them in the "Lib" folder.
After moving the modules from the "site packages" folder to "Lib" it seemed to work.
cool... update can solve the issue
cool... update can solve the issue you mean update
soundfilemodule, right?
i first install this module in conda environment , it does not work.
but when i use commend pip install soundfile. it is successful and the code could run