user10491813 wrote:You'd have to record the average volume when they aren't speaking and then consider them to be speaking if the average captured volume in a sliding window goes above that threshold...
the question is now, how can the program know when someone is speaking? (next to all the background-noise in my room)..
like a "isSomeBodySpeaking(soundbuffer)" method?
or are there any better ideas to deal with echo-cancellation?If you're not to the level where you can code a tradional echo-cancellation algorithm, then I'd recommend you simply put in a button the user has to hold down in order to speak...and disable the rendering to the speakers while the user has the button pressed.