Slashdot Mirror


Software Based Echo Cancellation?

tcyun asks: "I am helping to put together a small studio for a project at my workplace which will require some audio mixing. We have been able to find software solutions (often times open source) for almost all of our needs except for echo cancellation. I have done the requisite searches and have found a large number of hardware based echo cancellation devices, but have not found a purely software based solution. Is anybody aware of one?"

"For some more information, my office is trying to get a small system up and running that will allow multiple locations to video conference together. We have some specific requirements and have a fairly good handle on the entire video part of the problem.

However, we are running into problems with parts of our audio mix. The first issue is something that (I believe) is called 'mix minus.' This means that in a group conference, speakers do not have audio sent back to their location. (This is important for various psychology and network latency related issues.) There are several hardware based solutions that are available and we have some software based options.

The larger problem is echo cancellation. As many people may need to speak at once (and to avoid the requirement of having individuals constantly muting their microphones), we would like an echo cancellation component. The ideal would be a software solution that we could run locally, perhaps in conjunction with the same code running on the remote systems. However, most of the solutions we have found are hardware based (DSPs, ASICs, etc.).

The technology used on the studio side as well as the host side will involve various operating systems. We are trying to avoid avoid relying on specific OTC hardware solutions (namely, sound cards) as we would like to be able to create a solution that would function over time, particularly as specific hardware solutions tend quickly to horizon. So, having nice code that could be compiled on different systems would be a plus. Ideally, we would like to minimize the amount of hardware necessary, so an echo cancellation algorithm that could run in conjunction with other processes would be nice, but it is not a requirement."

11 of 211 comments (clear)

  1. Hack old Modem Drivers! by WndrBr3d · · Score: 5, Interesting

    Back in the day when 56k modems were taking off, there was a large piece of software people were coding into drivers called 'Ring Cancelation'.

    These were added because when you send data down an analog line at high speeds, you begin to hear an audible sound which sounds like ringing. The modem drivers needed to be able to tell the difference between this ringing sound and the actual data.

    I think a good place to start if you cannot find any software is perhaps hacking these drivers or something along those lines.

    It's a good start at least. Hope this helps :-)

  2. Microsoft! by genka · · Score: 2, Interesting

    It is as far from the open source as it gets, but the Windows Messenger includes voice features and has a software echo cancellation. Little known fact: Messenger 4.6 does not need Passport for operation, in closed enviroments any SIP server will do just fine. Also, encoded media stream it outputs uses standard encoders and standard RTP protocol. So Messenger can interoperate with many applications.

  3. The Access Grid uses hardware to do this... by Troy+Baer · · Score: 3, Interesting

    The Access Grid is a project started at Argonne National Lab's Math and Computer Science Division to build a mostly open videoconferencing system over the Internet, using multicast audio and video streaming. You may want to take a look at their technology to see if they have ideas you can use.

    Anyway, a "node" on the Access Grid consists of a room with at least three computers: a multihead box running Win2k for display to several video projectors, a computer running Linux for audio capture and playback, and another running Linux for video capture. The audio capture machine usually runs into a Gentner AP400, which does echo cancellation as well as phone bridging.

    I don't know of anybody who has software that does this; sorry.

    --Troy
    --
    "My life's work has been to prompt others... and be forgotten." --Cyrano de Bergerac
  4. I have echo-cancellation software! by jmv · · Score: 5, Interesting

    Look here for my echo-cancellation code:
    http://speex.sourceforge.net/audio/sndio.tg z

    It's bundled with open-sound calls to read and write audio in real-time, while removing acoustic echo from the input. There's not much doc, but the test2.c program is quite simple. Feel free to contact me at jean-marc.valin@hermes.usherb.ca. Note that there's no real project (sourceforge or other) assiciated to it but if you find it useful, I may create one.

    1. Re:I have echo-cancellation software! by jmv · · Score: 3, Interesting

      Two things I forgot to mention:
      1) It works on stereo (of multi-channel) input/output
      2) There's an SSE (float version of MMX) version too

  5. Re:Hardware Audio Tools by Ooblek · · Score: 3, Interesting
    I believe the echo he is referring to is the echo that happens in the latency from the time their voice is spoken to the time it makes the round trip from the other side.

    The term "Mix Minus" does not apply here. It is generally used in post production where you lay off your audio mix minus the voice over. You probably also don't need echo cancellation software. Just put a mixing board on each side of the conference call. Mix the local side's voice with the remote side's voice on each side. So they hear themselves as they speak and don't hear themselves from the remote side. Use directional microphones so that the loud speaker on the remote side can't be heard in the remote microphones. You could also require everyone to wear headphones I suppose. (Probably wouldn't be popular.)

  6. Flash 6 as a possible solution... by Aquaman616 · · Score: 3, Interesting

    I've been hearing about some new technology from Macromedia that might make your life a *lot* easier. Apparently the Flash 6 plugin supports hooking into both webcams and mics (after the user OKs it) as well as special socket-based connections to a new piece of server software codenamed TinCan. In addition they've talked about the server supporting shared objects as well.

    From what it seems you're able to put code on both the client and server and both are based on ECMAscript. This would let you do a lot more than nearly every other solution I've ever seen. I don't know when the server is supposed to be released, but if you check up on the recent interviews with MMs CTO Jeremy Allaire on C|Net or The Register you'll see that they seem to be hinting that it will be available later this year.

    --
    A|Q|U|A
    1. Re:Flash 6 as a possible solution... by Aquaman616 · · Score: 2, Interesting

      Oh yeah, and duh, it supports echo cancelation there in the Flash plugin.

      --
      A|Q|U|A
  7. Re:Noise gate by goofy183 · · Score: 2, Interesting

    Actually a noise gate would be very effective. I am involved in our colleges technincal sound & lighting organization. We run pro level audio systems for concerts and such here. As was suggested a gate would cut the mic channel once the signal went below a certain level. Your worry about the sound comming from the confrence room speakers triggering the gate is semi valid. You would have to do a bit of trial and error in each room to set the db level to cut off the signal at. I figure if we use gates on a drum set at a concert with house speakers putting out 120+ db and them still only have the gates allow signal when the set is being played.

    So I know the original post may not want to use hardware but gates are your best bet. If there could be any way to have each person's mic on it's own channel into the computer you may be able to write some simple audio proccessing software to mute a channel after the signal is below a certain level.

  8. Can you use local (lapel / boom) microphones? by jolshefsky · · Score: 2, Interesting
    From my own experience with video conferencing and speaker phones, the biggest problem stems from the balance between getting enough microphone gain to pick up the quietest speaker and reducing both kinds of feedback/echo (single-site feedback / cross-site echo.) The obvious solution is to move each output device closer to its corresponding input device.

    In other words, either (1) exchange the room speakers for earpieces or headphones or (2) exchange the room microphones for lapel or boom microphones. Clearly the degenerate case has everyone essentially speaking into a separate telephone receiver which probably defeats the purpose of the system altogether.

    Of course, it would be way cooler to have a setup where the room microphones are aware of the room speaker output and automatically cancel it out. The trouble is it's way cooler because it's so difficult to do.

    --
    --- Jason Olshefsky

    Karma: Poser (mostly affected by adding this line long after everyone else did)

  9. Re:Hardware Audio Tools by ibennetch · · Score: 2, Interesting

    Just FYI; a minux mix is often used, for example, in news operations where a satellite feed is being used. The remote reporter gets a minus mix, which is program audio minus their voice. Because of the distance 22,000 miles out and back twice (once to the station and once back) should add up to like 5 or 6 seconds. when you're trying to talk, listen to the producer or director talk to you, and interact with the reporters in the studio, hearing your own voice delayed that badly isn't a good idea. It's not the program audio (what you hear in your house) that's minus anything; but the signal to the reporter on the other end of the satellite.