I used librosa module to get this audio file signal, I used this code:
import librosa
import librosa.display
from matplotlib import pyplot as plt
from scipy.signal import butter, filtfilt
x, sr = librosa.load("./output.wav")
def butter_highpass(data,cutoff, fs, order=5):
"""
Design a highpass filter.
Args:
- cutoff (float) : the cutoff frequency of the filter.
- fs (float) : the sampling rate.
- order (int) : order of the filter, by default defined to 5.
"""
# calculate the Nyquist frequency
nyq = 0.5 * fs
# design filter
high = cutoff / nyq
b, a = butter(order, high, btype='high', analog=False)
# returns the filter coefficients: numerator and denominator
y = filtfilt(b, a, data)
return y
x_f=butter_highpass(x,1000, sr, order=5)
plt.figure(figsize=(14, 5))
librosa.display.waveshow(x_f, sr=sr)
plt.show()
I know python, but I don't have any knowledge of audio processing and this stuff.
Now, Is there a way to get all parts in a long file audio, let's say 1 hour, that have all this intense parts (music).
