def read_wav_file(file):
r"""
Loads wav files from disk and resamples to 22050 Hz
The output is shaped as [timesteps, 1]
Parameters
----------
file
Returns
-------
"""
import librosa
data, sr = librosa.load(file)
return np.expand_dims(data, axis=-1)
评论列表
文章目录