I'm trying to get the sampling rate of wav
file using several python libraries, and I'm getting different results:
(1):
import wave
wave_file = wave.open(fname, 'rb')
frame_rate = wave_file.getframerate()
output of frame_rate = 16000
(2):
from scipy.io.wavfile import read as read_wav
sampling_rate, data = read_wav(fname)
output of sampling_rate = 16000
(3)
import librosa
X, sample_rate = librosa.load(fname)
output of sample_rate = 22050
Why the output of librosa
library is different ?