1
$\begingroup$

I am trying to identify a sound region of a word from a wav file (44100Hz). My research gave me the idea that I must use "Short-Time Energy" and "zero crossing rate". But the problem is I am not clear with the formulas to code. So if someone can guide me to a much clear Pseudo code I will greatly appreciate it. And also if someone can tell me the order of using this I will highly appreciate that too. Thanks in advance.

$\endgroup$
1
5
$\begingroup$

Audio processing FFT of chunks of audio This will give you the short term energy as a function of time and frequency.

The zero crossing in itself is easy to code (the example is conceptual, but very inefficient)

x0 = x(1); 
for i = 2:length(x)
  x1 = x(i);
  if (x0 > 0 && x1 < 0) || (x0 < 0 && x1 > 0)
     % you have a zero crossing
     doSomethingWithAZeroCrossing(i);
  end
  x0 = x1; 
end

However, zero crossings are fairly sensitive to benign and typically irrelevant changes in the audio signal, so zero crossings have only limited usefulness. In particular

  1. even small amounts of noise can generate lots of extra zero crossings and "jitter" the existing ones
  2. Fluctuations in DC offset or very low frequency noise (like an Air conditioner or a heating fan picked up my a microphone) move the zero crossings all over the place
$\endgroup$
1
  • $\begingroup$ thanks for the answer. So seperating the frame using only the "short term energy" is enough? $\endgroup$ – user1114638 Jan 20 '12 at 15:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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