I have one wav file which I resampled to 16.000 kHz with Audacity. Now I am trying to load the file with python with 2 different ways.
import tensorflow as tf
import librosa
f = "path/to/wav/file/xxxx.wav"
raw = tf.io.read_file(f)
audio, sr = tf.audio.decode_wav(raw, desired_channels=1)
print("Sample Rate TF: ",sr.numpy())
y, sr2 = librosa.load(f)
print("Sample Rate librosa: ",sr2)
#Sample Rate TF: 16000
#Sample Ratelibrosa: 22050
Why is the sample rate so different for the same file? Which library I can trust more?