Error: Librosa No BackendError

python
#1

Hi, i am trying to understand the code for speech recognition and as i was using this command,
i = random.choice(train.index)

data_dir = ‘E:/Voice_analytics/’

audio_name = train.ID[i]
path = os.path.join(data_dir, ‘Train’, str(audio_name) + ‘.wav’)

print(‘Class: ‘, train.Class[i])
x, sr = librosa.load(‘E:/Voice_analytics/train/Train/’ + str(train.ID[i]) +’.wav’)

plt.figure(figsize=(12, 4))
librosa.display.waveplot(x, sr=sr)

I get this error:


NoBackendError Traceback (most recent call last)
in ()
7
8 ##print(‘Class: ‘, train.Class[i])
----> 9 x, sr = librosa.load(‘E:/Voice_analytics/train/Train/’ + str(train.ID[i]) +’.wav’)
10
11 ##plt.figure(figsize=(12, 4))

~\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)
114
115 # All backends failed!
–> 116 raise NoBackendError()

NoBackendError:

I do not know why. Can anyone help me out here?

0 Likes

#2

try
conda install -c hcc scikits.samplerate
and it should resolve issue.

Cheers.

0 Likes