I'm trying to build a video chat program using Adobe Flex but there is a giant problem with echos. If the participants arn't using headsets, everything they say echos. Worse, they can actually create positive feedback loop of echos that won't end until the mics are muted.
Has anyone found a solution for this on the Flex/Flash platform?
My software is using the Speex codec and I've done my best to eliminate all buffering (i.e. it's a live stream and I set the buffer length to 0). The loop back option is turned off and the "Use Echo Suppression" is turned on. I'm using the Red5 server for the video and audio streaming.
Any help would be appreciated.
Echo is when the sound from the speaker comes back into the microphone. This often happens because the microphone and speaker are placed too close together, causing you to hear yourself on a slight delay after you speak.
In other words, one user's voice travels across the phone system to the other party, their phone's speaker plays the sound, then their phone microphone picks up that sound and it is transmitted back to the first phone as an echo. This is common on cell phones, wither iPhones, Androids, or Samsung Galaxy.
This is a known problem in Adobe's software for which there is no fix presently.
For now you can only work around the problem.
You should implement a Push-to-Talk mode in your application and make it easy for users to switch to Push-to-Talk if they are experiencing sound quality problems.
If all users of the application have headsets then they won't have to resort to Push-to-Talk.
If your application is doing many-to-many conferencing it might be an interesting idea to allow users to request a speaker token.
Using an approach based on the suggestion of tst it might be possible to have the application checking which people are talking and then granting the speaker token automatically, rather than have users manually requesting it. Obviously usability testing would have to conducted to ensure this works well in practice.
More info on the bug
You can refer to the following Adobe bug report for more details:
The bug description reads as follows:
Flash player has no AEC support yet. There is no AEC support in Flash player 10 beta also. Developers need built-in AEC to create convenient webservices with live audio/video communication without requirement for user to have a headset. According to Speex project website Speex supports AEC. Please add AEC support for release version of Flash Player 10 to make suitable for communication webservices.
You'll need to implement some filtering to make sure that everything output from the speakers is eliminated from the mic input (or as close as possible). I'm not aware of the specific tools to do this, but the basic idea is that you take parallel time slices of the input and output, and you subtract the wave form of the output from the input. Due to latency, you might have to introduce an offset so things match up.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With