Hilbert envelope in scipy matches original signal

47 Views Asked by At

I need to get Hilbert envelope plot over original sound but I can't understand why it doesn't work with my audio file.

Envelope with my audio file

Envelope with different audio file

Еxample of what I need

import matplotlib.pyplot as plt
from scipy.signal import hilbert
from scipy.io import wavfile
import numpy as np
samplerate, data = wavfile.read('signal.wav')
t = 100
data1 = data[:t]
plt.plot(data1)
plt.plot(np.abs(hilbert(data1)))
plt.show()
0

There are 0 best solutions below