Skip to content
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

OSError: sndfile library not found #128

Open
TacoByte opened this issue Jul 22, 2024 · 2 comments
Open

OSError: sndfile library not found #128

TacoByte opened this issue Jul 22, 2024 · 2 comments

Comments

@TacoByte
Copy link

M1 Max Sonoma

nicecube@nicecubes-MacBook-Pro stable-audio-tools % python3 ./run_gradio.py 
Traceback (most recent call last):
  File "/Users/nicecube/Library/Python/3.11/lib/python/site-packages/soundfile.py", line 142, in <module>
    raise OSError('sndfile library not found')
OSError: sndfile library not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/nicecube/stable-audio-tools/./run_gradio.py", line 2, in <module>
    from stable_audio_tools.interface.gradio import create_ui
  File "/Users/nicecube/stable-audio-tools/stable_audio_tools/interface/gradio.py", line 10, in <module>
    from aeiou.viz import audio_spectrogram_image
  File "/Users/nicecube/Library/Python/3.11/lib/python/site-packages/aeiou/viz.py", line 26, in <module>
    from librosa import power_to_db
  File "/Users/nicecube/Library/Python/3.11/lib/python/site-packages/librosa/__init__.py", line 209, in <module>
    from . import core
  File "/Users/nicecube/Library/Python/3.11/lib/python/site-packages/librosa/core/__init__.py", line 6, in <module>
    from .audio import *  # pylint: disable=wildcard-import
    ^^^^^^^^^^^^^^^^^^^^
  File "/Users/nicecube/Library/Python/3.11/lib/python/site-packages/librosa/core/audio.py", line 8, in <module>
    import soundfile as sf
  File "/Users/nicecube/Library/Python/3.11/lib/python/site-packages/soundfile.py", line 162, in <module>
    _snd = _ffi.dlopen(_os.path.join(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: cannot load library '/Users/nicecube/Library/Python/3.11/lib/python/site-packages/_soundfile_data/libsndfile.dylib': dlopen(/Users/nicecube/Library/Python/3.11/lib/python/site-packages/_soundfile_data/libsndfile.dylib, 0x0002): tried: '/Users/nicecube/Library/Python/3.11/lib/python/site-packages/_soundfile_data/libsndfile.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/nicecube/Library/Python/3.11/lib/python/site-packages/_soundfile_data/libsndfile.dylib' (no such file), '/Users/nicecube/Library/Python/3.11/lib/python/site-packages/_soundfile_data/libsndfile.dylib' (no such file)
@hushaudio
Copy link

Hi Tacobyte.

First, you should really error dump into chatgpt instead of GitHub. You should also read the error even tho I know it’s always painful.

The problem is you need to install libsndfile, which the error says python can’t find (I think you use brew to install it on Mac) -> detailed helpful instructions can be found here (it’s free): chatgpt.com

Just copy and paste the error into chatgpt and talk to it, it’ll guide you through the install process. Less wait time than GitHub. You got this. Enjoy!

@hushaudio
Copy link

If you just want to check out stable audio open and don’t want to deal with the python stuff, you can also use this free vst plugin and model engine I created at Audialab:

https://audialab.com/products/deep-sampler-2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants