Reputation: 171
I am trying to get features from a sound file(.wav);
Here is the stft feature result:
Upvotes: 3
Views: 1840
Reputation: 1058
You can use PyWavelet in following manner to get the continuous wavelet transform of an audio wav file. However, the operation is little slow.
import pywt
import scipy.io.wavfile
wavefile = 'path to the wavefile'
# read the wavefile
sampling_frequency, signal = scipy.io.wavfile.read(wavefile)
#
scales = (1, len(signal))
coefficient, frequency = pywt.cwt(signal, scales, 'wavelet_type')
Upvotes: 4