I read a .wav file using the read function of the soundfile library in Python. I was wondering if there is any function to get the number of pulses of this signal, something like the pulsewidth function in Matlab.
If not, given that I did
[data,fs]=sf.read(wave)
I'm also trying something like this:
y=data2.count(data2>0.5)
but I'm getting this error:
AttributeError: 'numpy.ndarray' object has no attribute 'count'