Displaying 4 results from an estimated 4 matches for "powersum".
Did you mean:
powersim
2008 Aug 29
0
Fw: Voice Activation Level (speex 1.1.11.1)
Manisha,
I'm still here. :-) Here's the function:
// Returns the average power level in the given signal
float getPower(signed short int *signal, int numSamples)
{
int i;
float amp;
float powerSum = 0.0f;
for (i = 0; i < numSamples; i++)
{
amp = (float) abs(signal[i]);
powerSum += amp * amp;
}
return powerSum / (32768.0f * 32768.0f * (float) numSamples);
}
Note that you should determine an activation threshold experimentally
and consider offering UI to...
2006 Mar 02
0
Voice Activation Level (speex 1.1.11.1)
...a problem if you just use the Speex denoiser
(which is VERY effective) and calculate the power of the signal after
that. This is the function I use to calculate the power:
// Returns the power of a signal (sample_t is signed 16-bit int)
float getPower(sample_t *signal, int numSamples)
{
float powerSum = 0.0f;
for (int i = 0; i < numSamples; i++)
{
float amp = (float) abs(signal[i]);
powerSum += amp * amp;
}
return powerSum / (32768.0f * 32768.0f * (float) numSamples);
}
I can't say that this is optimal or even correct, but it works very
well for me. And users rarely have to adj...
2006 Mar 02
0
Voice Activation Level (speex 1.1.11.1)
...roblem if you just use the Speex denoiser =
(which is VERY effective) and calculate the power of the signal after =
that. This is the function I use to calculate the power:
// Returns the power of a signal (sample_t is signed 16-bit int) float =
getPower(sample_t *signal, int numSamples) {
float powerSum =3D 0.0f;
for (int i =3D 0; i < numSamples; i++)
{
float amp =3D (float) abs(signal[i]);
powerSum +=3D amp * amp;
}
return powerSum / (32768.0f * 32768.0f * (float) numSamples); }
I can't say that this is optimal or even correct, but it works very well =
for me. And users rarely ha...
2006 Mar 03
0
Fw: Voice Activation Level (speex 1.1.11.1)
...a problem if you just use the Speex denoiser (which
is VERY effective) and calculate the power of the signal after that. This
is the function I use to calculate the power:
// Returns the power of a signal (sample_t is signed 16-bit int) float
getPower(sample_t *signal, int numSamples) {
float powerSum = 0.0f;
for (int i = 0; i < numSamples; i++)
{
float amp = (float) abs(signal[i]);
powerSum += amp * amp;
}
return powerSum / (32768.0f * 32768.0f * (float) numSamples); }
I can't say that this is optimal or even correct, but it works very well for
me. And users rarely have to adjust the...