# python3: speech recognition - calculating features of a WAV file

I am supposed to do this as a school project, but I am kind of lost when it comes to signals and would appreciate your help. Also, English is not my first language, and I will be translating the assignment mostly literally, as I am not familiar with a lot of terms used in signal processing, so pardon me for any mistranslations, please.

I have WAV files with these characteristics:

• mono
• 16000 Hz
• 16-bit precision
• 16-bit Signed Integer PCM encoding

Right now I am supposed to calculate a vector of features for each frame (sample?) of each WAV file.

They even suggested a solution. They recommended to do this using a linear filter bank, which produces 16 coefficients by summing coefficients of a logarithmic power spectrum. There's an exact formula, but it's irrelevant for this question, I think.

What can I do to get an array with values of this logarithmic power spectrum (is that the right translation)?

I have imported these libraries and can freely use any of its functions: IPython, numpy, matplotlib, soundfile, scipy.signal

Thank you

• It sounds like you have a lot to do. I can give you any number of code lines to extract STFT features, mfcc features or other possibilities, though you will not understand what is the meaning of this. I suggest you start reading and watching tutorials and start figure out, what features, what is a sound file, what features are valid for sound and so on. look for a speech recognition tutorial. Dec 8, 2019 at 7:41
• The process is all described in the assignment, I just need the values of the logarithmic power spectrum. I thought I could get it by passing the signal to scipy.signal.periodogram(). It returns an ndarray of "Power spectral density or power spectrum of x", but I tried it and that doesn't seem to be it. It was just a one dimensional field of values. I thought there were supposed to be multiple values for each sample. Dec 8, 2019 at 11:34
• Again, it seems like you are just using trial and error to get a vector\matrix\tensor with similarity to the results you think you are supposed to get. Try and understand what is a power spectrum of x or what is power spectral density. Are they different? You cant expect to complete a school project by learning nothing. You have to read and learn. Your question (at the moment) is very general because you lack the background. Dec 8, 2019 at 11:54