Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

VAD, or basic voice detection

Avatar of billysdomain
billysdomainFlag for United Kingdom of Great Britain and Northern Ireland asked on
ProgrammingVoice Over IPVoice Recognition
3 Comments1 Solution681 ViewsLast Modified:
Hi,

Does anyone have any tricks to detect voice/speech in a PCM audio block?

Lets say i have a 25ms block of PCM audio, before i stream this to the network, i would like to embed a value in its header which has computed the probability of speech within that packet (it can also refer to the result of the previous packet as well if desired)

I am currently doing this by computing the Power of each packet (i have attached a code snippet), i then embed the average of this computation in the header.

The recieving unit will use this value to try and automate a PTT (Push to talk simplex) system

Im wondering if anyone could suggest a better/more precise way of doing this - code snippets a bonus!

Im after C++ or C code.

I have looked into the various G*** offerings but everything looks way complicated.

Many thanks
void GetPower(short *signal, int numSamples)
{
	int i;
	float amp;

	for (i = 0; i < numSamples; i++){
		amp = (float) abs(signal[i]);
		FPower += amp * amp;
		}

	FPowerAdditions += numSamples;
}
ASKER CERTIFIED SOLUTION
Avatar of MyCaption_Team
MyCaption_TeamFlag of United States of America image

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Commented:
This problem has been solved!
Unlock 1 Answer and 3 Comments.
See Answers