# Signals - Removing blocks

I'm after some advice on a problem that I am facing regarding signal processing.

I am processing a voice clip (.wav) and this voice clip contains noise, and I need to remove the noise and just concentrate on the Phones so I can analise them.

What I have thought about, and, what I have researched is, if I use zero-crossing as well as the total energy I can remove the blocks that do not contain sufficient energy or frequency.

The problem at the minute is that I have a 1D vector, acting as a 2D vector and let's assume the following data is used:

v1 = {128, 128, 128, 127}


Now my current algorithm squares each of these numbers and then sums the entire vector up. This, would therefore not be able to give me an accurate identification of noisy signals. So should I therefore split the signal into blocks (In that I get a 2D vector)? e.g.

B1 = {128, 128};
B2 = {128, 127};

e1 = {sum( (128^2) (128^2) )};
e2 = {sum( (128*2) (127^2) )};


Therefore, this would mean I am given 2 (In this example) energies which I can then check to see if they match the threshold.

Last question, do you think the methods of zero-crossing AND energy are good an accurate way of determining noise and removing it?

Hope someone can help me, thanks :)!

-

## migrated from stackoverflow.comSep 24 '12 at 0:27

This question came from our site for professional and enthusiast programmers.

same as dsp.stackexchange.com/q/2367/29 ? – endolith Sep 24 '12 at 16:38

An energy or zero-crossing criterion might help in detecting segments containing no voice, but it won't help in removing the noise superimposed with speech. Since you are mentioning removing noise for improving speech analysis, this doesn't look like the right technique to use.

If you compute your energy using small windows, down to summing a few adjacent coefficient, you will see fluctuation in energy which are just due to the periodic variation of the waveform itself! As a rule of thumb, the window size on which you compute an energy feature must be at least one magnitude bigger than the period of the signal to analyze. Assuming a f0 of 200 Hz, this gives you a minimal integration window of 50ms, or 400 samples at 8kHz.

-
thanks for your reply. But I don't get it. I need to strip the data I have depending on a certain threshold.. In a paper I've read, I can calculate the total energy by summing the entire vector BUT this will not give me the correct energy to strip data. What would the best method be of calculating the energy, to determine whether or not the sample is spoken or unspoken? Thanks :) – Phorce Sep 24 '12 at 10:04
Compute the energy by summing the square of the samples over overlapping blocks of 20ms to 100ms length. I don't really understand the point of stripping the silences from a speech signal before performing recognition/analysis, though. Useful for endpointing sure, but if you do it too aggressively between words, it might be a problem. If a person is saying two distinct words with a blank between them, removing this blank might cause these two words to be recognized as a single one. – pichenettes Sep 24 '12 at 10:43
Regarding "whether the sample is spoken or unspoken": it is impossible to perform such a classification at the sample level. The larger your analysis window, the more reliable your classification will be. – pichenettes Sep 24 '12 at 10:44