Displaying 4 results from an estimated 4 matches for "getpower".
Did you mean:
getlower
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...
2006 Mar 02
0
Voice Activation Level (speex 1.1.11.1)
...tter than I ever expected.
Background noise is not 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 wo...
2006 Mar 02
0
Voice Activation Level (speex 1.1.11.1)
...han I ever expected. =20
Background noise is not 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 =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, b...
2006 Mar 03
0
Fw: Voice Activation Level (speex 1.1.11.1)
...etter than I ever expected.
Background noise is not 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...