Import library
import librosa
import librosa.display
filename = get_audio_path(AUDIO_DIR, 36096)
y, sr = librosa.load(filename)
print(len(y),sr)
With get_audio_path(AUDIO_DIR, 36096)
the function to get the path of the audio (.mp3) 36096
output
> NoBackendError Traceback (most recent call last) <ipython-input-12-e5b91455e58d> in <module>
> 1 filename = get_audio_path(AUDIO_DIR, 36096)
> ----> 2 y, sr = librosa.load(filename)
> 3 print(len(y),sr)
> 4 each_file = filename.split('/')[-1]
> 5 genre_name = each_file.split('.')[0]
>
> ~\Anaconda3\lib\site-packages\librosa\core\audio.py in load(path, sr, mono, offset, duration, dtype, res_type)
> 110
> 111 y = []
> --> 112 with audioread.audio_open(os.path.realpath(path)) as input_file:
> 113 sr_native = input_file.samplerate
> 114 n_channels = input_file.channels
>
> ~\Anaconda3\lib\site-packages\audioread\__init__.py in audio_open(path, backends)
> 114
> 115 # All backends failed!
> --> 116 raise NoBackendError()
>
> NoBackendError:
any help please !