0
$\begingroup$

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

$\endgroup$
3
  • 2
    $\begingroup$ 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. $\endgroup$
    – havakok
    Commented Dec 8, 2019 at 7:41
  • $\begingroup$ 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. $\endgroup$
    – stitch123
    Commented Dec 8, 2019 at 11:34
  • $\begingroup$ 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. $\endgroup$
    – havakok
    Commented Dec 8, 2019 at 11:54

1 Answer 1

1
$\begingroup$

you can extract most of the well-known features such as MFCC, filter bank, PLP, Prosodic, chroma features and so on ... using:

  1. speechpy or librosa libraries in python environment. You can extract any features from *.wav file. the list of functions is here.you can choose the best of them depending on your need. for example, you can try for MFCC by this code. also, it is very easy by speechpy functions.
  2. Another great tool for feature extracting is OpenSMILE by AudEERING. You can use it via command line in Windows or terminal in Linux. For more info about it, you can use this link. This tool is most cited in speech research papers.
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.