I'm developing a project that identifies Phonemes to be able to identify whether someone is saying either "Yes" or "No".

So far in the project, I have used Zero-crossings to identify what the person is saying, this works really well and seems simple enough to understand. The project, however, needs a few enhancements and has to be developed using a Hidden Markov Model.

My question is this:

I want to develop a Hidden Markov Model, without erasing the work that I have already completed. I.e. I strip the data that do not warrant consideration by counting the number of zero-crossings as well as the summation of the blocks.

I do not understand what data I would need to train the HMM in order to be able to identify these Phonemes. E.g.

With Zero-crossings I have identifies that:

Yes - Zero-crossings start low and then the value increases

No - Zero-crossings start low and then do not increase with value.

Could I train my HMM algorithm so that it interprets these values?

Or could anyone suggest a method of which I can train the HMM to be able to identify the word that is inputted in the sample?

Hope someone can help :)!

  • $\begingroup$ The spectral flatness of "ssss" is much higher than "noooo" $\endgroup$ – endolith Nov 29 '12 at 16:22
  • $\begingroup$ @endolith So if I did a spectral flatness of each of the blocks and found that "sssss" is higher than "nooo" how can I use this information in an HMM? $\endgroup$ – Phorce Nov 29 '12 at 17:52
  • $\begingroup$ I don't know anything about HMM, just pointing out an easy way to tell one signal from the other. :) $\endgroup$ – endolith Nov 29 '12 at 18:50

You should first appreciate why an HMM would be useful. The problem that you've described is classify a given utterance as either a yes or a no (it would be also useful to have a "neither" class). Because speech is a time-evolving quantity, it needs a classifier that is able to deal with sequences of feature vectors. Different people say "yes" or "no" with different speeds. For example, I might say "no" and the speech signal could be 200ms long or you could say "no" and the speech signal could be 50ms long.

You might want to look into creating windows of a fixed length for your speech signal and extracting certain transform domain coefficients (like FFT, DCT etc.) from it and use these to train an HMM. Alternatively, the mel-frequency cepstrum coefficients (MFCCs) are also very popular in training phoneme based HMMs for speech recognition.

  • $\begingroup$ Thank you for your reply. I could possibly have a neither case! So are you suggesting that I could strip the sample (using zero-crossing etc) and then using an FFT transform these into a particular frequency and then train the HMM that way? @mustafa $\endgroup$ – Phorce Nov 16 '12 at 21:13
  • $\begingroup$ no.. I'm suggesting abandoning the zero-crossing detector. Use the original speech signal, capture the first few discrete cosine transform coefficients and use these to train the HMM. The reason I'm suggesting the DCT is its energy compaction property. Most of the energy of the speech signal will be concentrated in a few coefficients at the lowest "frequencies". With the FFT, the energy might be spread around and you won't know which ones to choose. Try plotting the coefficients of the FFT and the DCT and comparing. I'd be interested to see what you find out. $\endgroup$ – Mustafa Nov 16 '12 at 22:05
  • $\begingroup$ thanks for the reply, I didn't want to get rid of the zero-crossing because its such a big part of my research. So basically how then system works so far: 1) reading in the signals 2) splitting the signals into blocks 3) stripping the signals that do not have enough frequency... ('Zero-crossing') This has gone well, so shall I forget the zero-crossing detector, instead use a DFT? In other words, shall I keep steps 1,2,3? Because I don't think I would get much result performing the DFT on the whole signal.. Sorry if this is confusing $\endgroup$ – Phorce Nov 16 '12 at 22:17
  • $\begingroup$ Could you explain to me what you mean by "zero-crossings".. are you using it to find peaks in the signal amplitude by taking the second derivative ? $\endgroup$ – Mustafa Nov 16 '12 at 22:47
  • $\begingroup$ basically, I have a threshold value and then I count how many times zero is crossed in the blocks within the sample, and, if they do not meet the threshold then the block is removed leaving only the signals that contain the phonemes.. Make sense? $\endgroup$ – Phorce Nov 16 '12 at 23:07

Your Answer

