1

I am having a no backend error in my python code to open an audio file using librosa module. I have downloaded ffmpeg and seted environment but still I am getting no backend error. I am getting this error with .mp3 extension, with wav it is working properly .

import librosa as lib
t,s_r=lib.load(r"C:\songs\03-BuddhuSaMann-DownloadMing.SE.mp3")

This is the error I am getting:

UserWarning: PySoundFile failed. Trying audioread instead. warnings.warn('PySoundFile failed. Trying audioread instead.')

RuntimeError: Error opening 'C:\songs\03-BuddhuSaMann-DownloadMing.SE.mp3': File contains data in an unknown format. During handling of the above exception, another exception occurred:

NoBackendError:

1 Answers1

0

Please try this: https://stackoverflow.com/a/63480393/7999026 to make sure your file is not corrupted. If it isn't and librosa still fails, you can try opening your file with scipy.

from scipy.io import wavfile
t,s_r = wavfile.read(r"C:\songs\03-BuddhuSaMann-DownloadMing.SE.mp3")
Josmy
  • 408
  • 3
  • 12