I am using librosa to process audio file,
'good.wav' is a 30-second audio file
The code -
data, sampling_rate = librosa.load('good.wav', )
plt.figure(figsize=(12, 4))
librosa.display.waveplot(data, sr=sampling_rate)
Here, the sampling_rate = 22050
This above code results in the correct plot.
Then, I changed the sampling_rate(frequency) to 60000
plt.figure(figsize=(12, 4))
librosa.display.waveplot(data, sr = 60000)
This code results in this plot:
The above code works fine with the fact, frequency = 1/Time, The time is decreased when the frequency is increased.
After that, I resampled the audio,
samples = librosa.core.resample(data, sampling_rate, 60000)
It gives the "samples" variable with high values than the "data" variable. Actually, len(data) = 600000 and, len(samples) = 1800000
Then, I want to plot the "samples" values-
plt.figure(figsize=(12, 4))
librosa.display.waveplot(samples, sr = 60000)
which results in the following plot:
But in this plot, the time is stable. Why the time is not reduced when the frequency is increased to 60000.
Thank you