Open tval2 opened 6 months ago
same here, reinstall ffmpeg:
brew install ffmpeg@6
brew install sox
then reinstall torchaudio won't work, torchaudio.list_audio_backends() always prints to empty []
hardware: mac osx m3 max
I've been experiencing the same issue.
I think I have figured out a solution but don't have time to properly test what I've done. I've followed the advice here: https://pytorch.org/audio/stable/build.linux.html in a fresh conda environment, including the "[Optional] Build TorchAudio with a custom built FFmpeg" section. I've just change the line to install ffmpeg to conda install -c conda-forge ffmpeg=6
(i.e., I've specified that the ffmpeg libraries should come from ffmpeg 6.something).
Please forgive this uninformative message!
here is my solution on mac:
brew install ffmpeg@5
and make sure to the lib to path:
export PATH="/opt/homebrew/opt/ffmpeg@6/bin:$PATH"
export LDFLAGS="-L/opt/homebrew/opt/ffmpeg@6/lib"
export CPPFLAGS="-I/opt/homebrew/opt/ffmpeg@6/include"
then reinstall torchaudio
🐛 Description
I get "RuntimeError: Couldn't find appropriate backend to handle uri <_io.BytesIO object at 0x13f1f8450> and format None." when processing basic audio data on my mac but not on my colab notebook.
Full code is here `import torchaudio print(torchaudio.list_audio_backends()) def read_audio_from_stream(audio_stream, sampling_rate: int = 16000): sox_backends = set(['sox', 'sox_io']) audio_backends = torchaudio.list_audio_backends()
Versions
torch==2.3.0 torchaudio==2.3.0