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."

211 comments

  1. how do you do that? by vladkrupin · · Score: 2, Insightful

    wouldn't the echo cancellation itself propogate over time and create artifacts in the sound? Or am I totally misunderstanding the issue altogether?

    --

    Jobs? Which jobs?
    1. Re:how do you do that? by vladkrupin · · Score: 0, Offtopic

      well, it wasn't first post for starters - there were a few before me.

      But it is a really good question why it is redundant.
      I made a statement, I asked a question, no-one agreed/disagreed/answered... Gotta wonder...

      Moderators are interesting people...

      --

      Jobs? Which jobs?
  2. I saw this... by Anonymous Coward · · Score: 0, Offtopic

    On Batman Beyond...

    This scientist had developed an invention that allowed him to block all sound waves, as well as focus their energy. Once he turned evil (and tried to kill Batman), it was a powerful weapon!

    But be careful... if you abuse this sort of weapon, you may end up like him with permanent hearing loss, and a desire for vengrance against Batman.

  3. why not.. by rhetland · · Score: 0, Troll


    WHY why DON'T don't YOU you WRITE write ONE one?

    (and send me a copy...)

    1. Re:why not.. by damien_kane · · Score: 1

      $count = 0;
      while ($count {
      if((strtoupper($parent_post[$count]) != $parent_post[$count]) || ($parent_post[$count] == " " && $parent_post[$count + 1] == " ")) echo $parent_post[$count];
      $count = $count + 1;
      }
      ?>

      There, it removes your echo and your lame allcaps...

  4. One possible solution... by TuxLuvr · · Score: 1
    There's a really good software solution for this HERE...

    HTH !

    1. Re:One possible solution... by drewbradford · · Score: 1

      But that link doesn't point to a software solution at all. That's a hardware device, and it doesn't do noise/echo cancelling, it does videoconferencing. I'm sorry to say that you're a little off.

    2. Re:One possible solution... by TuxLuvr · · Score: 2, Informative
      But that link doesn't point to a software solution at all. That's a hardware device, and it doesn't do noise/echo cancelling, it does videoconferencing. I'm sorry to say that you're a little off.

      Whoops! My bad.... I meant to post THIS link...

    3. Re:One possible solution... by BobTheBooser · · Score: 1

      Sorry....

      I origionaly replied to the wrong article

      If you sent the audio from each source as an individual (multiplexed packetized) stream, at each source you could just not play the stream (any packets) originating from that source.
      Simple and Effective, but would require sending more data than mixing one version at a central location and sending that version to all conections (but that would be silly anyway due to lag).
      But generaly you wouldnt have more than one person talking at a time and when it happens if you are using a decent compression targeted to voices (look at the compression schemes used in digital mobile phones (both GSM & CDMA)) this shouldnt be to much of a bandwidth problem anyway

  5. Hardware Audio Tools by saveth · · Score: 5, Informative

    The reason you're finding more hardware tools than software tools for echo cancellation, among other things, is that the telecommunications industry demands these sorts of things with much more fervor than the average consumer. Echo cancellation devices (for example, a codec with echo cancellation built in, running on a DSP) are used extensively in cellular telephones, voice routers, and this sort of thing. Your best bet, in this respect, is to find a company that is willing to release the source code to the software that is running on your hardware.

    Alas, I do not know of any software, especially open source or free, that provides a full suite of audio processing utilities. Why is it that you're against using hardware, in the first place? Too expensive? Those are the breaks.

    1. Re:Hardware Audio Tools by newerbob · · Score: 2, Informative
      You don't want echo cancellation, you want an acoustically dead studio.

      Put foam on the walls.

      --

      --
      Ask the Ya-Hoot Oracle Anything!
    2. Re:Hardware Audio Tools by tuxit2 · · Score: 1
      Your best bet, in this respect, is to find a company that is willing to release the source code to the software that is running on your hardware.

      You mean when hell freezes over?

      And why anyway? Echo cancellation is not that hard. A lot of open source 3D graphics software is much more sophisticated than echo cancellation. I think the reason why there are few open source implementations is because few people want it. As others have pointed out, open source telephony software contains this.

    3. Re:Hardware Audio Tools by PotPieMan · · Score: 1

      Of course, that won't help with the problem of multiple microphones picking up one person's voice at different times. That's probably where most of the echo is coming from in this situation.

    4. 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.)

    5. Re:Hardware Audio Tools by Anonymous Coward · · Score: 0

      Actually, most open source telephony software does not have echo cancelation in it. being in the telephony business, i can vouche for the fact that it is hard to find in open source form. in fact... having attempted the same search some time ago, I gave up.

    6. 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.

  6. Re:Professionalism by einer · · Score: 1

    Hey, at least he didn't leave the caps lock key on again.... I had a headache for that entire week...

  7. Noise gate by joshwa · · Score: 3, Informative

    As many people may need to speak at once (and to avoid the requirement of having individuals constantly muting their microphones),

    Why not just install a noise gate at the microphone inputs?

    For the non-audio-inclined slashdotters, a noise gate sets a minimum sound level threshold before the signal is transmitted.

    1. Re:Noise gate by illsorted · · Score: 1

      I don't know why this post was moded "Troll", but such is life.

      I believe some sort of noise gate would be the best solution and the easiest to implement. Since it appears that there isn't any open or free software to accomplish you goal, this would probably be the cheapest, hardware-wise. If you haven't purchased mics yet, there are many that include filters and echo elimination built in.

      Give it some thought.

    2. Re:Noise gate by Anonymous Coward · · Score: 3, Informative

      >>For the non-audio-inclined slashdotters, a >
      >>noise gate sets a minimum sound level threshold
      >>before the signal is transmitted.

      I'm no audio engineer, but it's obvious it wouldn't work.

      Person A talks into Microphone A - also picked up with a delay in Mic B.

      a)You want to cancel the echo from Mic B - so you use a noise gate. it works as long as i don't talk loud enough to cross the threshold on Mic B. Given that this is in a conference setting, the mic of the person next to me is going to pick me up without that huge of difference from the mic right in front of me. Whats the difference between me speaking loudly and the person next to me speaking somewhat softly? Not much and the gate doesn't know any different.

      b)To screw things up we only have to get over the threashold. So I'm speaking AND a neighbor starts to speak. So the sound at his mic is his voice + my voice. The total is over the threashold. Again - the gate does nothing.

    3. Re:Noise gate by Anonymous Coward · · Score: 0

      Some sounds in words are softer than others so the voice would drop out occassionally.

      Other than that, it's a good cheap fix.

    4. 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.

    5. Re:Noise gate by bucktug · · Score: 1

      If they are using two microphones that are not omni-directional, but instead uni-directional then the gate is the perfect thing for them. Every microphone has a diffrent sweet spot. For the uni-directional mic you can have rather loud noises all around it... as long as the sound isn't directed into the sweet spot, it isn't going to get picked up much at all. Thus the sound gate would most definatly kill any noise made at Mic 2 from the person at Mic 1.

      --
      I had a flame... but she had a fire.
    6. Re:Noise gate by ecarlson · · Score: 1

      Actually, there's no echo problem with the next person's mike picking up your voice. It's the mic at the other side of a large room that is a problem, and a noise gate would solve that problem, unless the person at the opther side of the room was also talking, which would open the noise gate.

      - Eric My web page

      --
      - Eric, InvisibleRobot.com
    7. Re:Noise gate by ibennetch · · Score: 1

      several others have written back regarding that a noise gate would be effective, and I agree; but there is another solution involving slaving several noise gates together that might help in the conference setting. I belelive they were developed for press conference type events for television (being in television myself, you'd think I'd know). It's an automatic mic mixer (one example) that basically opens the mic that best picks up a source. I'm not sure how it would handle several people talking at once, I think it's smart enough to tell the difference but I've never used them myself (in most cases a person can do such a thing so much better than a machine can). Anyway, this is probably way too expensive, suggests using special mics, and is not a software solution; but it's something to consider. ~ibennetch

    8. Re:Noise gate by ibennetch · · Score: 1

      Except any decent gate has variable time limits for how long after the signal has dropped below the threshold before it shuts off the microphone. It could be set high enough so taht if you take a breath or speak softly for a second the mic stays open.
      oh, BTW, they're not just a 'good cheap fix', I've got a good friend in the live sound mixing business (you know; the whole reason you hear your favorite band at a concert) who loves them. Personally; I'd rather close the mic myself and have me controlling it; but when you've got 20 or 50 or 80 mics, that gets a little out of control.

  8. Removing echo by Myshkin · · Score: 5, Funny

    sed 's/^echo/#echo/' /etc/inetd.conf >/etc/inetd.new
    mv /etc/inetd.new /etc/inetd.conf
    kill -HUP $(ps -ef |grep root.*inetd|grep -v grep|awk '{print $2}')

    no more echo

    1. Re:Removing echo by guillebot · · Score: 0, Offtopic

      Clap Clap Clap

    2. Re:Removing echo by natefaerber · · Score: 1

      lame, but here's a tip:

      kill -HUP $(ps -ef |grep root.*[i]netd|awk '{print $2}')

      makes that line smaller or why not:

      killall -HUP inetd (or xinetd)

      --
      -- My HARDWARE, My CHOICE.
    3. Re:Removing echo by Anonymous Coward · · Score: 0

      or why not:

      killall -HUP inetd (or xinetd)


      Not all systems have killall.
      kill -HUP `cat /var/run/inetd.pid`

    4. Re:Removing echo by sporty · · Score: 2

      Heh, I guess my delivery was off :\

      http://slashdot.org/comments.pl?sid=32264&cid=34 85 471

      --

      -
      ping -f 255.255.255.255 # if only

    5. Re:Removing echo by zbuffered · · Score: 5, Funny

      You can do it even easier in DOS:
      echo off

      --
      Synergy is your friend
    6. Re:Removing echo by SEWilco · · Score: 1

      You forgot:
      rm $(whereis echo)

    7. Re:Removing echo by MadAhab · · Score: 2

      And even though most systems do have killall, the original poster's version works whether inetd or xinetd is being used! Better. Though the "grep [i]net" bit is indeed shorter.

      --
      Expanding a vast wasteland since 1996.
    8. Re:Removing echo by Anonymous Coward · · Score: 0

      All the good ones do... the rest are dying, according to Kreskin

    9. Re:Removing echo by trumpetplayer · · Score: 1

      AATTZZ

      OK

      (That was echo, in the good old days of BBSing.)

  9. Re:Riddle me this.... by Jupiter9 · · Score: 1

    Slashdot always italicizes quotes.
    Get with the program.

    --

    --
    Does anyone remember /\/\/\?
  10. Asterisk PBX by Anonymous Coward · · Score: 5, Informative

    There's an excellent open-source PBX called Asterisk. Among other things, it provides an MMX-optimized echo-canceller. Look here

  11. Tough Problem by mellifluous · · Score: 3, Informative

    Maybe someone at /. will find an answer for you, but I would be surprised to see this implemented in any kind of stand alone SW package. Because it is a specialized real-time application requiring fast feedback, it makes sense to implement it as an embedded system (i.e. in hardware).

  12. a solution with out need echo cancellations by Anonymous Coward · · Score: 0

    yeah if you got everyone talking under a cone of silence then you wouldnt have to worry about echos and sound artifacts.. :)

  13. 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 :-)

    1. Re:Hack old Modem Drivers! by mellifluous · · Score: 4, Insightful

      I don't think this is quite the same problem. Ring cancellation is looking for a very particular sound with known characteristics. Echo cancelation has to supress the delayed versions of an aribitrary sound feeding back through the system.

    2. Re:Hack old Modem Drivers! by Anonymous Coward · · Score: 0

      I'm not certain, but wouldn't code like that need to be in the modem's firmwire (not the driver)? Unless you're talking about a software modem in which case I suppose it's the same.

  14. we need more by RealisticWeb.com · · Score: 3, Insightful

    This is a great question you are asking, and I would love to see a good answer. The shame of it is, I'm expecting to see a bunch of posts in response to this saying "If you need one then write it yourself".

    Is it just me, or does it seem like the open source offerings for things related to audio/video are lacking in general? I wish I had time to make improvements myself, or the money to contribute to the developers, but it seems like we need more in this area to be able to be more competitive with proprietary solutions.

    --
    Sigs are out of style, so I'm not going to use one...oh wait..
    1. Re:we need more by phpdeb · · Score: 1

      Yeah. like the great video/audio editing applications that are available on Windows. Oh wait, those suck too.
      I think the problem with making really robust audio/video applications is that it's difficult to do.

      There are some interesting projects in the OSS world in this area, but they are new and not yet mature.

      Like everything, it takes time for things (e.g. software applications) to take shape and be worth something to anyone other then a niche crowd.

      That's the other problem. Audio/video applications in the OSS world are not in as high demand as things like development tools and web servers.

      I predict in the next year or so their will be some pretty good OSS apps in this area.

    2. Re:we need more by Anonymous Coward · · Score: 0

      Cubase, Cakewalk, and Cooledit are all very useful audio software packages for Windows. Also, many plugins, such as Waves, are far superior to similar standalone hardware solutions.

      In fact, the positively shitty support for audio recording and editing available under Linux is what kept me from dropping Windows completely last year. Last I checked, there was nothing for linux that even came close to decent multitrack recording functionality. Just a bunch of Windows Recorder clones...

      I remember that Debian was working on a kernel mod for realtime media work. I don't know what became of it, but perhaps instead of just geeking out over the kernel, someone should write applications that actually utilize its power.

      I predict that within the next three years you will see nothing new in OSS audio save for two mod players released, one of which was abandoned in alpha, one of which died during the planning stage. There may be an mp3 player with plugin effects attempted, but the kid who starts it will insist on writing it in Perl for 'leet points and die of a brain anyuerism while trying to implement a FFT module in that most disgusting of languages.

      On the commercial front projects for Mac and Windows will have perfected Thought-to-MIDI technology, allowing anyone who can think of a melody the ability to write scores without sullyinh their hands with an instrument. Linux pundits will dismiss this technology as "Window$ Dressing" and go back to their computers to write the most complex version of "Hello World!" ever seen while masturbating to Ranma.

    3. Re:we need more by phpdeb · · Score: 1

      I use Cakewalk, it's ok. But it's not like some amazing application.

      Come to think of it I have yet to use any audio application on any platform that works to my liking (some things are best done the old-fashioned way). A friend of mine uses a Mac to do all his mixing (records on a 4-track) and he loves it.

      Linux will get something in the next year or so that works ok, about the same that windows has now.

      There is know doubt in my mind that certain areas of the Linux desktop will trail the commercial side.

      You just have to know you the limitations of the OS and decide whether it makes sense for what you are doing.

      For top-notch audio, go with a hardware solution for recording and use your PC to mix.

    4. Re:we need more by Art+Tatum · · Score: 1
      Just a rundown:
      There is currently the ALSA Project, the MusicKit (a MIDI and realtime DSP framework from the NeXT world), and . This trio, together, would be great for writing full-featured music applications. Now we just need to do it. :-)

      I'm considering tackling this problem soon if I have time.

    5. Re:we need more by fferreres · · Score: 2

      Are there any closed source software echo cancelation utils already done? Are they practical?

      People are arguing that the software solutions are to limited or to expensive to implmement so that hardware echo cancelation is what we have now.

      --
      unfinished: (adj.)
  15. Texas Instruments Acquires Ditech's Telinnovation by papasui · · Score: 0, Redundant

    MOUNTAIN VIEW, CALIF., and DALLAS (April 16, 2002) -- Ditech Communications Corporation (Nasdaq: DITC) and Texas Instruments Incorporated (TI) (NYSE:TXN) today announced that TI has acquired Ditech's Telinnovation echo-cancellation software unit for a purchase price of $26.8 million. As a result of the acquisition, TI will provide customers with complete hardware and software carrier-class platforms that combine its voice-optimized digital signal processors (DSPs) and Telogy Software(TM) products with the industry's most widely used echo-cancellation technology. As part of the agreement, Ditech secures a license to implement the Telinnovation software on its echo cancellation systems, including enhancements made by TI to the echo cancellation algorithms. The agreement also calls for joint marketing and sales efforts.

    "TI is committed to providing our broadband voice-over packet, or VoP, customers with the silicon and software they need to win in this fast-growing market," said Bill Simmelink, general manager of TI's VoP Business Unit. "By combining our silicon and software platforms with Ditech's echo-cancellation software and expertise, we will be able to provide our customers with complete, high-performance carrier-class VoP solutions."

    "This transaction and license agreement with TI reflects a strategic decision by Ditech to bolster and focus all of our echo-cancellation resources to win in the echo cancellation systems business, where historically Ditech has generated the vast majority of its revenues and profits," said Tim Montgomery, Ditech's president, and CEO. "With this transaction and licensing agreement with TI, we maintain the echo-cancellation software component of our product advantage and increase the funds available to develop new systems products."

    Ditech's high-capacity echo-canceller software is recognized as the industry benchmark for DSP-based voice enhancement and echo cancellation. It is regularly specified as a required component of new equipment purchased by major telecommunications carriers transitioning to wireless and packet-switched architectures. Echo-cancellation software algorithms are embedded in programmable DSPs to eliminate the echo effect caused by signal reflections of the speaker's voice as it crosses a variety of voice transmission systems.

    Dr. Charles Davis, Ditech's chief technology officer and one of the world's foremost experts in the field, will join TI and continue to lead the echo-cancellation software team. Prior to joining Ditech, Dr. Davis led Telinnovation Service Corporation, which Ditech acquired in February 2000. The Telinnovation team began providing echo-cancellation software in 1983 and has years of experience working with various TI DSP platforms.

    The acquired unit will become part of the Broadband Communications Group within TI's semiconductor business, reporting to Mr. Simmelink. The echo-cancellation team will remain in Silicon Valley, moving into an existing TI facility in San Jose.

    Conference Call
    Ditech will host a conference call at 4:20 Eastern Time/1:20 pm Pacific Time on Tuesday, April 16 to discuss this announcement. Ditech President Tim Montgomery and Ditech CFO Bill Tamblyn will lead the discussion. Any member of the public can listen to the conference call by calling the following number: (706) 634-5581. The conference call will also be broadcast live over the Internet and can be accessed by going to the Investors section of the Ditech web site: http://www.ditechcom.com. A replay of the conference call will be available via Ditech's web site or by calling the Encore replay number at (706) 645-9291. The conference ID is 3870574. The replay of this call will be available two hours after the call is completed, until 5 PM ET on April 23rd.

    Texas Instruments Broadband Solutions
    For OEMs developing broadband communications solutions, TI's advanced signal processing-based silicon and software platforms deliver the optimal performance, lower power consumption, and system-level integration required to rapidly deploy differentiated next-generation products for cable modems, digital subscriber line (xDSL) modems, integrated access devices (IADs), Voice over Internet Protocol (VoIP) gateways, carrier infrastructure, and home and office wireless networking. See www.ti.com/sc/broadband.

    # # #

    About Texas Instruments
    Texas Instruments Incorporated provides innovative DSP and analog technologies to meet our customers' real world signal processing requirements. In addition to Semiconductor, the company's businesses include Sensors & Controls, and Educational & Productivity Solutions. TI is headquartered in Dallas, Texas, and has manufacturing, design or sales operations in more than 25 countries.

    Texas Instruments is traded on the New York Stock Exchange under the symbol TXN. More information is located on the World Wide Web at www.ti.com.

    About Ditech Communications Corporation
    Ditech Communications Corporation is a global telecommunications equipment supplier for voice and optical networks. Ditech's voice products are high-capacity echo cancellers that utilize advanced software and digital signal processor (DSP) technology. This unique combination of software and hardware allows Ditech to deliver Voice Quality of Service (VQoS(TM)), a robust and cost-effective solution for voice enhancement (including noise reduction) and echo cancellation. Ditech also develops and markets optical subsystems and systems communications products. Ditech's optical subsystem products include optical amplifiers, transponders and network management products that enable service providers to cost-effectively expand and extend the reach of fiber optic networks. Ditech (DITC) is listed on the Nasdaq National Market and is headquartered in Mountain View, California (web site: http://www.ditechcom.com). Ditech is also developing and marketing its Titanium optical transport system product through its subsidiary, Altamar Networks (http://www.altamar.com).

    Forward-Looking Statements
    Statements contained in this press release regarding the transaction between Ditech and TI and other statements of their respective managements' beliefs, goals and expectations may be considered "forward-looking statements" as that term is defined in the Private Securities Litigation Reform Act of 1995, and are subject to risks and uncertainties that could cause actual results to differ materially from those expressed or implied by these statements. Those risks and uncertainties include the risk that Ditech and TI will not realize the benefits they expect under the joint marketing agreement, that TI will not successfully integrate the Telinnovation operation into its business, and that if there is a breach of a representation or warranty of Ditech in the transaction documents then Ditech may have liability to TI. Each company's statements herein are based on its current expectations. Ditech and TI each disclaim any intention or obligation to update any forward-looking statements as a result of developments occurring after the date of this press release.
    SEARCH NEWS RELEASES

    COMPANY PRESS KIT

    Backgrounders/Fact Sheets

    TI Fact Sheet

    Company Backgrounder

    DSP Backgrounder

    Analog Backgrounder

    Broadband Backgrounder

    Wireless Backgrounder

    OMAP(TM) Backgrounder

    Wi-Fi Backgrounder

    Origins of TI

    Corporate Citizenship

    Fact Sheets

    Award Fact Sheet

    Biographies

    TI Leadership Team

    Jack St. Clair Kilby

    Charts & Maps

    TI Global Presence Map

    The DSP and Analog Era

    MORE PRESS RESOURCES

    News Releases

    Media Contacts

    Executive Presentations

    Financial Info

    2001 Summary

    Annual Report

    TI Acquisitions

    Image Library

  16. Re:Italics by Anabas · · Score: 1

    Err. Ignore the above. This browser sucks like Hoover.

  17. Re:Professionalism by tps12 · · Score: 2

    If you think about it, most of the front page is usually quoted (since the editors try to minimize their own writing), so italicizing the whole page is probably a pretty close approximation.

    --

    Karma: Good (despite my invention of the Karma: sig)
  18. echo cancelation by mazariyn · · Score: 1

    You're probably not going to find a free software echo canceler. I've been working on audio processing for a cell phone design and AEC (automatic echo cancelation) is budgeted for a lot of time and money. It's a pretty involved signal processing function that is well-suited to optimization on a specialized processor, hence the number of solutions you're seeing for ASICs and DSPs. The bottom line is that I would suspect that you're probably going to have to pay for it.

  19. Classic application! by spaceyhackerlady · · Score: 3, Informative

    Echo cancellation is a classic application of adaptive filters. Every reference ever published on the subject discusses it. I like Haykin's book myself.

    I just did a search on Google and came up with 4000 references.

    The underlying theory is pretty hairy, but the implementation of an algorithm like LMS is straightforward.

    ...laura

    1. Re:Classic application! by Anonymous Coward · · Score: 0

      Real world echo cancellers are much more complicated than the examples you see in text books. There are problems of residual echo (cancellation is not perfect), convergence times, in audio cancelling there are multiple echos.

      The best echo cancellers have been refined over a period of years. In addition, VoIP delays make the echos more pronounced requiring better cancelling.

    2. Re:Classic application! by Erandir · · Score: 3, Informative
      Laura's right: you'll find the maths and the algorithms for echo cancellation in most textbooks on adaptive filtering. Check out the July 1999 issue of the IEEE Signal Processing Magazine (it shouldn't be too hard to get hold of it, most university libraries' engineering section should have it) -- it is an issue dedicated to "Adaptive Algorithms and Echo Cancellation". All the maths and algorithms you need are discussed there. Yes, you do need a good background in linear algebra to follow the underlying theory, but the algorithms should be easier to implement, and you're likely to find source code for most of them on the web (LMS filtering is used in many other applications too).

      Echo cancellation is a common design problem in hands-free telephone systems and conference systems; there is lots of literature on the subject. See the references in the articles I mention above.

    3. Re:Classic application! by Anonymous Coward · · Score: 1, Informative

      An LMS implementation of a noise canceller is about ten lines of Matlab (or Siglab) code. It will look something like this:

      % ref is your noise reference
      % ypri is your input signal mixed with the noise

      alpha = 0.2; % Time constant.. play with this
      L = 30; % Filter length. Play with this too.

      W_adap=0*(1:L); %initialize filter weights to zero
      pow = 1; % initial input power estimate
      beta=alpha/L; % normalize the time constant

      % You'd be doing this forever %
      for n = ((L-1)/2)+1:(length(ref)-(L-1)/2)

      % e is the cleaned up signal
      e(n) = ypri(n) - W_adap*ref((n-(L-1)/2):(n+(L-1)/2))';

      % mu is your update coefficient
      mu = alpha/L/pow;

      % W_adap are your filter weights.
      % This updates them
      W_adap = W_adap + mu*e(n)*ref(n-(L-1)/2:n+(L-1)/2);

      % This updates your power estimate, which you
      % will use for the next cut of mu
      pow = (1.-beta)*pow + beta*abs(ref(n))^2;
      end

      %% An SNR estimate
      % snrtot =sum(e.^2)/sum(ypri.^2);

      This may not be state of the art, but it will give you a very noticeable improvement. You may want to shift the center of your filter in time a little.

      There's a lot of variations on this problem, so do check out Haykin (or recent literature) if this doesn't do it for you.

      Luck,
      Jordan

    4. Re:Classic application! by Petrus · · Score: 1

      So far the best posted algorithm (not many were posted though :-)
      Some comments:
      1. L will be probably a lot bigger, itshould be samplingRage*MaxEchoDuration.
      E.g. 40kHz*250ms = 10,000 !

      2. Ws so not need to think about ref as zero-delay centered signal. That makes to seem the formulas too complicated.

  20. Jebus by Anonymous Coward · · Score: 0

    I've been a *nix geek too long.
    I actually parsed that script and laughed at it. :/

  21. More Info Please... by stapedium · · Score: 1

    Are you talking about acoustic or electrical echoing? Have you taken a look at ITU G.168?

  22. 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.

    1. Re:Microsoft! by Anonymous Coward · · Score: 0

      If you're right, it definately doesn't work. The few times I've used messenger recently to talk with my mother, we have some horrible echos going around.

      Especially when the bass is turned up.

    2. Re:Microsoft! by Anonymous Coward · · Score: 0

      Are you sure it is not the microphone and speaker setup you are using? You need to use headphones to have a chance of working.

    3. Re:Microsoft! by Anonymous Coward · · Score: 0

      MS Messenger echo cancellation is only present on Windows XP version. It is not included in other platform versions.

    4. Re:Microsoft! by Anonymous Coward · · Score: 0

      Well, one important reason for having echo cancellation is to allow you to use speakers rather than headphones!

  23. 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
    1. Re:The Access Grid uses hardware to do this... by mikeage · · Score: 2

      We just set up our AG node this past month... we do echo cancelation with a nice fancy box from Gentner that costs several thousands of dollars ;). The really annoying thing is that you program it over an RS-232 port-- from windows. The rest of the AG software is linux, though... vic and rat (for video and audio) respectively. It's fun stuff... check out accessgrid.org

      --
      -- Is "Sig" copyrighted by www.sig.com?
  24. Re:Texas Instruments Acquires Ditech's Telinnovati by mellifluous · · Score: 2

    From the article:

    Echo-cancellation software algorithms are embedded in programmable DSPs .

    Though the article refers to "software" I think this is still refering to the kind of embedded solution the poster was hoping to avoid.

  25. Forget software, get hardware by ttyp0 · · Score: 3, Informative

    I remember when I worked at Tellabs we had a product, EC-8000 Digital Echo Canceller Might be worth a look.

  26. Searches for echo cancellation software by Seth+Finkelstein · · Score: 5, Informative
    Am I misunderstanding the question? A Google search for "echo cancellation" software turns up quite a bit.

    Notably, a lead such as: http://www.nist.gov/speech/tests/ctr/h5e_97/echoca n.htm

    The echo cancelling software (ec_v2.5.tar.gz) that is applied to telephone data, may be obtained from Mississippi State University.

    The LDC has provided a perl script (mu_ec.perl) that will take a sphere-headered, 2-channel mu-law waveform file as input, apply the MSU/ISIP echo cancellation software, and produce a sphere-headered, 2-channel mu-law waveform file as output.

    Sig: What Happened To The Censorware Project (censorware.org)

    1. Re:Searches for echo cancellation software by Anonymous Coward · · Score: 0

      Really, you MUST be kidding. Do you realize how bloody many accounts he would have to have in order to HAPPEN to get mod points? I mean, that's just an absurd statement.

      My post is offtopic. Please mod it as such. Other people don't need to see my noise.

      ssd.

    2. Re:Searches for echo cancellation software by stilwebm · · Score: 3, Informative

      This is a good start. Note that the perl script linked to above only provides raw data to the ec.exe binary, but the source code is linked to on that page. Also, there is more information and the source code at http://www.isip.msstate.edu/projects/speech/softwa re/legacy/fir_echo_canceller/. Nevertheless, consider:

      * In running the echo canceller on sparcs (ss20, SPARCserver-1000), it takes between 3 and 4 times realtime to operate.


      Now a Pentium III 800 will probably run it in a fraction of the time for an SS20, say 1/2 realtime to 1/4 realtime. But if it is for a mixing project, there will be several streams to process. I wonder if the cost of having to use a dedicated computer for software processing will outweigh the cost of dedicated DSP hardware?

  27. Re:MeldStar ( MOD DOWN PARENT! ) by wren337 · · Score: 0, Offtopic

    The link to "meldstar" is a redirect to goatse.cx.

    You are a very bad man.

  28. Noise Filtering by NitsujTPU · · Score: 1

    A common algorithm (I believe it's used in modems) is the Widrow Noise Filter. I had to write one in a CS class. It's a type of neural net. The general algorithm for noise filtering is sort of machine intensive, so it's reserved for high end $$$ equipment (if I recall the lecture properly). This filter is a quick write though, and will get you set straight.

  29. Software echo cancelation by Anonymous Coward · · Score: 0

    Signalworks has a software based echo cancelation solution that will work on DSP's as well as PC's.

  30. Re:Texas Instruments Acquires Ditech's Telinnovati by Anonymous Coward · · Score: 0

    For those not familiar with Telogy's offerings:

    They sell firmware optimised for use with TI's DSPs, with primary applications in VoIP, VoDSL etc.

    I don't think you'll find it running on your pentium any time soon.

  31. Re:Hardware Audio Tools (alternative?) by Harley · · Score: 2, Informative

    I was amazed at all the processing going on inside the DSP back when I tested, and later debugged/coded, modems for a living. When you mentioned echo cancellation, it was the first thing that popped into my head.

    A logical extension of this for your application would be to try to get your hands on some source code from a "Soft" modem. The idea was to move the most intensive processing out of the DSP and onto the PC processor since they were, in theory, becoming powerful enough to handle all the operations in real-time. Actual performance of these types of modems is a completely separate story, but the echo cancellation code is out there somewhere. At thing point it should just be a matter of getting your hands on it.

  32. The Analog devices EZ-Kit (a 2181 demo) has it. by Ludwig668 · · Score: 5, Informative

    Check out Analog devices; their 2181 demo has echo cancellation as a part of the included software; source included.

  33. Re:Professionalism by tps12 · · Score: 2

    Is that site for real? The only story I read had like 6 completely clueless comments (e.g., xmms skips because you need a faster hard drive, or because 2.4 is bloated...huh?). While the S/N on slashdot is admittedly low, at least there is a signal in there somewhere.

    --

    Karma: Good (despite my invention of the Karma: sig)
  34. DIY - pure-data by phossie · · Score: 1
    if you're not averse to working out what you need to do on your own (there's a lot of literature out there on this subject), then i suggest PD (this is a nice place to start).

    runs on windows (NT/etc.) and linux, OS X port is in the works, IRIX is also supported. it's fast and very flexible, and will support a simpler solution - like gating, matrixed switching (if you've got separated inputs at hand), whatever - if you find one. the pd-list is quite supportive.

    --

    [|]
  35. Dictated Echo?! by Viking+Coder · · Score: 2

    We are trying to avoid avoid relying on specific OTC hardware solutions (Emphasis added.)

    Looks like this message was dictated with intermitent echo!

    --
    Education is the silver bullet.
  36. perhaps the reason you can't find it... by ultramk · · Score: 3, Insightful

    ...is because it doesn't exist.

    Realtime processing, AFAIK, be it audio or video, is astonishingly processer-intensive. It doesn't surprise me that DSPs are being used for this reason: they may be the only thing that can cut it in a cost-effective manner.

    i.e. you may be able to build a high-end workstation, and write some real-time software to handle this task, but since it probably wouldn't be able to do anything else at the same time doesn't that qualify as a hardware solution?

    Perhaps instead of going to extreme lengths to remove echos, perhaps you just need to work harder to prevent them in the first place? Pro audio mags have tons of ways to reduce echo and other unwanted effects in small (usually home) studios. Have you looked into this?

    Michael-

    --
    You catch enchiladas by picking them up behind the head and holding them underwater until they don't kick anymore -VeGas
    1. Re:perhaps the reason you can't find it... by Anonymous Coward · · Score: 0

      Something tells me that if solutions are available to mix two streams of uncompressed video at 25MB/s each in real-time on a dual PIV then adaptive filtering on a lowly audio channel isn't going to be too difficult.

    2. Re:perhaps the reason you can't find it... by blair1q · · Score: 3, Informative

      A DSP is just a CPU with one or twelve little two-step and array-math hacks in it. Any CPU that's 2X faster in FLOPs can do the same thing with ordinary arithmetic code.

      There are lots of new CPUs that are faster than lots of 5-year-old DSPs.

      --Blair
      "But then Microsoft puts the code in a directory somewhere under C:\Windows and kills the market."

  37. 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

  38. MS Cancel XP by Anti-Microsoft+Troll · · Score: 0

    Microsoft makes a program that does this. It echoes your checking account into Bill Gates' and then cancels yours for you.

    And then it sues you (unless you paid for a license to use it on every computer you've ever owned or will own. I had to buy a license for my C64, and one for my Microsoft X-Box 3.0 PC/PVR/DVD/Toaster/Shower.)

  39. Try Lucent.. by Anonymous Coward · · Score: 0

    A friend in Australia was working for Lucent Technology on a project like this, a few years ago. You might want to try searching in that direction...

  40. A possible simpler solution by hidden · · Score: 3, Informative

    1) Use directional microphones, or else throat mikes. This will make the neigbour's microphone only pick some one up very quietly, if at all.

    2)if there is still some echo problem, it should be quiet enough that simple (software) noise gates should solve the problem.

  41. Re:Cut and Paste coders by fishebulb · · Score: 2

    god forbid anyone use the software for something. He doesnt want to rip off the code, he wants to make USE of it.

  42. 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
  43. You need an acoustic echo canceller by Anonymous Coward · · Score: 5, Informative

    Most solutions offered by Ditech, Telogy, etc. cancel the electrical echo caused by an impedance mismatch 2 to 4-wire hybrids in the analog part of the Old Telephone Network. You seem to develop a packet-based videoconferencing system, which has no hybrid in it, so you must want to cancel acoustic echo, caused by reflection of the sound produced by the speaker-phone on the walls of a conference room.
    This is a very hard problem, because you have to modelize the environment of each conference room. You will have to guess mathematically (with the LMS algorithm for example) the echo response on a tail of at least 128ms for each room, which would take at least a few minutes to one hour on a P4 2GHz system.
    And what about if a door is suddenly closed in the conference room? Or what if the speaker phone is moved? You will have to re-modelize your echo response each time that happens, because the geometry of the room will have changed.
    The solution is surely not a software echo cancellation system, at least not before 2010.
    Think about a hardware solution, DSPs or ASICs (http://www.octasic.com)

    1. Re:You need an acoustic echo canceller by Anonymous Coward · · Score: 0

      This guy is right: look at how much data you have to process, and how much calculations are required in an echo cancellation algorithm, and you will understand you will have to switch to hardware, even if you have only 1 channel to echo-cancel..

    2. Re:You need an acoustic echo canceller by PissingInTheWind · · Score: 1
      Very interesting, do you have any link on that LMS algorithm? You seems to imply acoustic cancellation in impossible, have any idea why some people here pretends that they can do it? Does it really work?

      Anyway, thx for the infos.

      --

      A message from the system administrator: 'I've upped my priority. Now up yours.'
    3. Re:You need an acoustic echo canceller by Anonymous Coward · · Score: 0

      Here is a good link about LMS algorithm for echo cancellation:
      http://lcavwww.epfl.ch/~prandoni/ds p/echo/echo.htm l
      It's only an introduction, if you want to learn more there is Google :)
      There is some software that can do that, but certainly not real-time. (and that's what you need for a video-conferencing system)

  44. just use a better microphone by TwoEdge77 · · Score: 1

    You just need a better microphone. Use a teleconference unit from plantronics. As a side comment, looks like you're reinventing the wheel. There are a lot of off-the-shelf video conferencing systems out there that'll probably cost less than all your TIME spent tinkering.

  45. Echo cancel problems in home video / audio by loneoak · · Score: 0

    A lot of oral history and non-pro shot video has lots of echoing... much of this stuff is valuable, even irreplaceable, but the audio is so godawful it's damned hard to use. Whoever gets a sw, or even a hardware fix, for this problem and can get it to market at a non-prohibitive price (likely under $500) ought to find a good niche market.

  46. 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)

  47. Software Echo Cancellation by SEWilco · · Score: 1

    Just say to yourself "There is no echo" until you believe it.

  48. A list? by Futurepower(R) · · Score: 2


    I'd love to see a list of all the other software you have found.

  49. Re:Texas Instruments Acquires Ditech's Telinnovati by 680x0 · · Score: 1
    I don't think you'll find it running on your pentium any time soon.

    Why not? While at a given speed, a DSP will outperform a Pentium (assuming you aren't doing something dumb like trying to do floating point on a fixed point DSP), I haven't seen any GHz DSPs out there. Also, keep in mind, this is the kind of thing that SIMD architectures (like MMX, Altivec, etc.) were designed to speed up.

  50. Those are not echos. by Futurepower(R) · · Score: 2

    But those are not echos. Those are real signals picked up by other microphones. It might be difficult to DSP that.

    1. Re:Those are not echos. by eXtro · · Score: 1

      I haven't played with it, but I don't think it'll be difficult. Each microphone records its intended signal plus a delayed version of what each other microphone is recording. There will be strong correlation between the undesired sounds going into a particular microphone and the microphone at some other point. You should definately be able to do this adaptively (though there's no guarantee your PC will be able to do it in real time)

    2. Re:Those are not echos. by thorbo · · Score: 1

      I think it is important to keep in mind, that unless they are in the Superdome the two feet distance separating the speakers is not going to cause any "echo". I concur with the notion that the room is causing the problems, not the hardware. In fact, if multiple mikes were picking up any given speaker, the signal would actually be of a higher amplitude.

      --
      It just does get better than this!
    3. Re:Those are not echos. by TheSync · · Score: 2

      Those are real signals picked up by other microphones. It might be difficult to DSP that.

      I can't understand what the guy is asking about, but if this is the problem, the true answer is to use directional mics pointed at people's heads, and put a noise gate on EACH MICROPHONE. Infact, if you really want to do good recording, you should have a noise gate and compressor (and perhaps an expander) on each microphone BEFORE it goes into the mixer. Yes, it costs a lot, but you can get an eight channel block of compressor/gates for $2000 or so.

      Alternatively, you can use an automatic mic mixer which picks the loudest mic automagically, but these are really only appropriate for use in a live speach situation, not recording. They tend to sound a bit clunky.

  51. Re:There are two sides to every story... by Anonymous Coward · · Score: 0

    Err, yea, or in this case, THREE sides?

    What a crock of shite. Good job Michael.

  52. Um..one of each of these... by teamhasnoi · · Score: 3, Informative
    One (good) omnidirectional condenser Mic in center of room; everything will be in phase and mono. Send this signal to a noise gate to cancel out paper rustling, and then a compressor (hard or software). I'd guess a 1:10 (or less), with a threshold of -20db (give or take) and a soft limiter would do it. This will equalize the volumes between the loud drunk salesguy, and the quiet intern. Educate members of meeting that they need to speak confidently.

    I guess I don't see why NOT routing the audio back would be a problem, or maybe I don't understand the question.

    Otherwise, save your paper towel rolls, and hand them out before a meeting. I don't do this for a living, so YMMV.

    1. Re:Um..one of each of these... by theno23 · · Score: 1

      You don't understand the problem, the echo comes from the signal being sent to the other end, being picked up on the mic at the other end and sent back.

      The delay is in the order of 1500ms.

      You need a big (~100k point) adaptive FIR to cancel it, getting a PC to do it in realtime is challenging, and there won't be many resources left to do other things. We have a gentner at work, and its is fine. If you need >2 channels it would be cheaper than the eqivalent PC hardware, and its much easier to set up.

  53. soft-ware solution. by Hooya · · Score: 2

    well, since you asked for a 'soft'-ware solution, i suggest using foam padding on the walls surrounding your conference room. altho i don't understand why you're so bent on the material being soft. foam is soft and from my very-basic understanding of acoustics, it dampens and reduces echo. wait, oh... that software!?

  54. IBM Has One For License by vivekb · · Score: 2, Informative
    IBM has a software based solution (unfortunately only available as a Windows DLL) that is very impressive. I evaluated it for a project, but it wound up costing too much. Still, you could try contacting their lab in Israel.

    I doubt you will find an open source echo canceller, since acoustic echo cancellation is pretty difficult (and has generated many, many patents). Nearly everyone uses a different, proprietary algorithm.

    If you want to make one yourself, set aside about 10 months.

    1. Re:IBM Has One For License by Anonymous Coward · · Score: 0

      That 10 months is assuming you're an electrical (or computer) engineer with at least some knowledge about echo cancellation (say at least a masters in signal processing). New way of doing echo cancellation is via blind deconvolution! It's pretty cool...

  55. Re:Riddle me this.... by Anonymous Coward · · Score: 0

    "One or the other."

    ... or both!

  56. Exactly. I wish s/he'd posted by Anonymous Coward · · Score: 0

    I wish s/he'd posted what they've managed to put together as good software already. Would save a lot of time and effort for many of the rest of us, and we could point out problems with stuff they've picked, or at least ask why.

    -- Ender, Duke_of_URL

  57. Re:You need an acoustic... (MOD PARENT UP!) by mrpotato · · Score: 2
    Man, if all AC were that interesting and informative, we would need a reversed filter mechanism...

    Lots of people were modded up in this discussion proposing wrong, irrelevant or incomplete solution. Typical /. ...

    --

    cheers
  58. Re:Professionalism by Anonymous Coward · · Score: 0

    Since slashdot is trying to make money on this site, shouldn't they be taken off the .org domain and move over to .com, .biz, or perhaps .sux?

  59. Re:Noise gate - Echo Suppressor by Anonymous Coward · · Score: 0

    A noise gate can seem like a good solution a prime abord, but there is a better solution: Echo suppressors.
    Echo suppressors were used before the invention of echo cancellers, 20 years ago. (see ITU's G.164 recommendation).
    They were used to limit a conversation to half-duplex (so no echo can pass). Only the louder talker pass through the system. It is very easy to implement.
    They invented this in the 60s...
    But the guy needs both talkers to be able to speak at the same time... so this is not the solution he wanted.

  60. Re:Professionalism by Anonymous Coward · · Score: 0

    Alright, I'm going to post a reply as AC and see if I get modded offtopic as well. jeez, someone's really breaking out the mod points today.

  61. Use DSP harware - or you will kill your CPU by Anonymous Coward · · Score: 0

    The main reason that there isn't a viable software solution is that echo-cancellation is *very* processor intensive, so the best way is DSP (i.e. hardware).

  62. csound by tuj · · Score: 1

    Assuming you want software, I would think the best way to go would be Realtime Csound. If you're not familiar with the csound language, its very powerful for dsp and was designed for manipulation of audio. It runs on most platforms and processors. Different implementations of csound designed for realtime use exist for both cisc and risc architectures. Assuming you can design the appropriate algorithm for echo cancelation, csound may be ideal.

    Another option, also assuming you can design the algorithm, would be SuperCollider, which is another audio processing language that tends to have better realtime performance than csound. Only runs on macs tho.

    Finally, in terms of techniques, you might think about 'shooting' the various rooms (by recording a balloon popping) and using the resulting impulse data to remove (rather than add, as in conventional convolution) the echos on voice audio from that same room. FFT might work here also, although probably less effective. SuperCollider can do realtime convolution; csound might be able to, depending on how high of a sample rate you need.

  63. Echo cancellation on 12 lines of code. by Petrus · · Score: 4, Informative

    #define AdaptationRate 0.99
    // Basic adaptive LMS FIR algorithm.
    float EchoCancellation(float Sample)
    {
    static float History[MAX_ECHO_DURATION+1] = 0;
    int i;
    float AdaptationRate;
    float EchoAmpl;

    for( i=0; iMAX_ECHO_DURATION; i++)
    {
    EchoAmpl = History[i]*Coef[i];
    Coef[i] *= AdaptiationRate*(Sample-EchoAmpl);
    History[i+1] = History[i];
    }

    History[0] = Sample;
    return Sample-EchoAmpl;
    }

    That's all the "basic" science.
    You might find, that for 40kHz and 250ms echo this is too computationally intensive for a single Pentium. You may need some 1200 MIPS.

    You may then:
    1. Use Athalon ;-)
    2. Convert it to pointer arithmetic
    3. Convert it to integer arighmetic
    4. Skip some samples for echo estimation, sometimes
    5. Contact me to use more clever algoritm (IIR?)
    (Petrus.Vectorius@ied.com)

    1. Re:Echo cancellation on 12 lines of code. by Petrus · · Score: 2, Informative

      There is a bug.
      The line:
      Coef[i] *= AdaptiationRate*(Sample-EchoAmpl);
      Should be
      Coef[i] += AdaptiationRate*(Sample-EchoAmpl)*History[[i];

      Otherwise the Coef[i] would always stay at 0.

  64. Use low-tech solutions first. by Lumpy · · Score: 3, Informative

    if you are creating your studio then you need to make the studio fix the problem first, dont try to compensate for a crapy studio in the recording hardware/software.

    #1- Sonex, sonex, sonex. If you dont have sonex or the crappy sonex copy or even just carpet on the walls (Yes wall carpet looks good) along with the roughest texture ceiling tiles you can buy at the home-depot (or better yet the $90,00 a 2foot square city scape audio ceiling tiles) then you are wasting your time. it takes very little to make a room acoustically deadened to the point that properly set up microphones wont pick up any perceptiable echo. (Note: if you have you're mic's set so your artists or voice talent is farther away than 3 inches from the P popping screen then you have it set wrong. also dont let the talent talk quietly, make then talk or sing loud to overcome room acoustics.

    start with the low tech, then add your high tech bandaid filters.

    --
    Do not look at laser with remaining good eye.
    1. Re:Use low-tech solutions first. by Anonymous Coward · · Score: 0

      Second that. We audiophiles have the same problems with our speakers echoing off the walls and destroying our exquisite sound. For us, it's mostly been Sonex, ACS, that type of wall treatment. Go www.silencesource.com for a merchant and pricing.

      Nowadays, digital frequency and room correction is starting to come, but still few and far inbetween. For us, this would be stuff like the TacT Room Correction System, or the Perpetual Technologies P1A digital processor.

    2. Re:Use low-tech solutions first. by Dahan · · Score: 2
      I don't think he really means he has a problem with echoes off the walls... I think he means that when someone on the local side of the conference speaks and his voice is played back though the speakers at the remote side, it'll be picked up by the microphone at the remote side and sent back to the local side. Depending on how loud the speakers are, this could cause a feedback loop.

      I've had the same thing happen when using one of those internet voice chat programs. If one end uses speakers rather than a headset, you'll hear an echo of yourself talking. If both ends use speakers, crank up the volume and have fun with the feedback :0

  65. pure data by sadclown · · Score: 1

    Pure Data is a real time sound-manipulation program that runs on Linux, Windows, and Mac Os X. You'll be able to design any kind of sound processing algorithms you like but be warned: only Linux gives you input-output latency as low as 3 milliseconds. In Windows you'll have to settle for 300 ms unless you buy some fancy audiophile soundcard that supports Steinberg's ASIO.

    1. Re:pure data by Nynaeve · · Score: 1

      Creative Labs' Audigy supports ASIO and is targeted for the general user ($100 retail). It may even be suitable for the purpose described here.

  66. just do it at the command line by Anonymous Coward · · Score: 0

    >echo cancellation
    cancellation
    >

  67. What's your goal Seth? by Anonymous Coward · · Score: 0

    I ask this as a wide-eyed spectator fascinated by your tireless, seemingly insane (to a casual observer), crusading. What is your goal? Do you hope to send Mr. Sims to the gutter? Are you hoping for an apology? Why the endless petitioning?

  68. What you need is a quantum computer by Anonymous Coward · · Score: 0

    Or a GPL linux-compatible anti-Microsoft peer to perr echo canceller on a Debian or FreeBSD machine running an overclocked Transmeta processor.
    :)

  69. I've worked in a radio studio by AlaskanUnderachiever · · Score: 3, Informative

    Hell I helped build one. And while there is a LOT of noise cancellation and "echo reduction" software on the market (Cool Edit Pro has a few nice plug ins) the sound quality after applying such a filter could at best be called "fair". Unfortunately your best solution is to find a high quality mic with a bit of noise cacellation (and the higher end ones can be "tuned" with a hardware equilizer) and just suck it up and BUY THE FOAM. I know it's ugly. I know it's a pain in the ass. I know it's only effective if the studio is designed well, but nothing that I have personally seen (well under 40k that is) beats the stuff. Acoustic dampening foam is your cheapest option that will still maintain audio quality to a reasonable degree.

    --
    Find out about my new childrens book: SS Death Camp Criminal Batallion Go To Monte Carlo For The Massacre
  70. We are now passing the point... by Anonymous Coward · · Score: 0

    Err.. Ok then - imho, you missed the point :)
    From my understanding of linear systems (PDF file-54k)(I don't know the full workings of echo cancelation), they behave homogenously and additively. That's to say if you have a mix of signals (original & echo) and you take out the echo component, for e.g. my mixing it with an out-of-phase synthesized estimate of said component.. then it's gone, no artefacts, apart from any error in your estimate of what's echo and what's original - that's the clever bit.

  71. The speed of sound at sea level... by Futurepower(R) · · Score: 2

    thorbo is right. The speed of sound at sea level is something like 700 miles per hour (Mach 1). If I've done the math right, that is 1,026.67 feet per second. A 10-foot separation will cause a 10 millisecond delay. I believe a 50-millisecond delay is heard as echo. Can anyone help about this?

  72. Some good Intel libraries at... by Insightfill · · Score: 1

    http://www.intel.com/software/products/perflib/

  73. C Source code here by Anonymous Coward · · Score: 0

    http://www.isip.msstate.edu/projects/speech/softwa re/legacy/fir_echo_canceller/

    Have fun!

    1. Re:C Source code here by vladkrupin · · Score: 2

      the link is interesting though misspelled. Correct would be:
      http://www.isip.msstate.edu/projects/speech/softwa re/legacy/fir_echo_canceller/

      I haven't tried it myself (I obviously know very little about the matter altogether), but it seems to fit the description of the original problem pretty well. Doesn't look like quite a finished product yet, but, nevertheless, very interesting.

      --

      Jobs? Which jobs?
  74. Er... by Golantig · · Score: 1

    ...it is quite clear that this gentleman is talking about feedback and not room acoustics.

    In my experience such hardware or software solutions do more harm than good because they cannot distinguish between wanted and unwanted sound (unlike one's auditory system).

    Taking the time to set levels and proper mic/speaker placement should be sufficient. But to totally remove the problem then headphones really are the simplest option - just don't forget to turn the speakers off too! ;) In this case then the use of high quality mics/headphones is totally unnecessary. This also offers the users individual monitoring control.

  75. Out of Phase Echo Cancellation by SuperJames_74 · · Score: 1

    If I understand correctly, by "echo cancellation", you mean that, when several folks are talking at once, you want each person to hear everyone except themselves. If that's the situation, I would suggest flipping each speaking person's outbound signal 180 degrees out of phase with their inbound signal. That way, their own voice will cancel itself out in their personal conversation "mix". Make sense? To flip an audio signal out of phase, you delay it by twice its frequency. In other words, if your signal is 15 kHz, that's 15,000 waves per second. Or, 1 wave per 1/15000 of a second. If you mix in another copy of that signal which has been delayed by 1/30000 of a second, the two signals will be 180 degrees out of phase, and will cancel each other out. It is important that you only flip the speaking person's voice out of phase with the incoming signal, so that her voice is only removed from her inbound mix.

    --

    @sshatrack

    1. Re:Out of Phase Echo Cancellation by Anonymous Coward · · Score: 0

      Great theory. In practice, the audio is going over a network with a variable delay of up to half a second, so cheap noise-cancellation tricks don't work.

  76. Algorithm suggestion by Anonymous Coward · · Score: 0

    Here's my suggestion: (1) Send a test signal out of the speakers,
    and at the same time record the result. Subtract the two signals [input - output],
    and take the fourier transform. That will give you the echo delay
    for that particular system [where the concentrations are at the lower frequency, is
    what the echo delay is].

    Not only that, but for a variety of different volumes and input frequencies,
    you can get the attenuation of the echo. So you -- one time for each setup --
    run this to get the attenuation and delay, and then just subtract that off. Or maybe
    it would be better to subtract the fourier transforms, and then inverse-fourer
    it. I'd have to think about that.

    If you want a prepackaged solution, I'm pretty sure DIALPAD incorporated echo
    reduction into their JAVA code, so perhaps you could convince them to sell their
    echo-reduction algorithm to you--though it may not be cheap.

    1. Re:Algorithm suggestion by Petrus · · Score: 1


      Good, but Few comments:

      1. The speaker signal should be close to unit pulse.
      2. There is no need to subtract the signals.
      3. There is no need to do any tranform.
      4. There is no single echo to be handled, but infinite numbers of echoes from every point of the room superimposed together. You need sort of "Echo Profile.
      5. Subtracting the signals in frequency domain is not better, but worse and more computationaly intensive.

      The best is:
      1. Record the echo response to the impulse into E[i].
      2. Keep history S[i] if N previous samples.
      3. EchoCancelledSignal = Input - sum(R[i]*S[i])

      One problem:
      The echo might change as the source of sound and other objects or people move about the room. You might want to make the R[i] coefficients adaptive to the changes of echo as posted in the eralier algorithm.

      Petrus Vectorius

      P.S.:
      Go to comp.dsp newsgroups, it is actually quite trivial (as algorithm, implementation might require quite some processing power)

  77. Far from true: DSPs are historically very low MIPs by megalomang · · Score: 1

    We implemented an echo cancellation algorithm for a GSM phone. It required somewhere around 2-4 MIPS from our 26 MIPS budget. You should be able to find some app notes you can use to implement on a very inexpensive TI or ADI development kit.

    DSPs are historically very very slow in frequency when compared to other embedded CPUs (although this is far from true today). Until the past few years, DSPs have been lingering in the 10s of MHz range, while embedded MCUs were venturing into the 100 MHz range.

    You can probably implement on any MCU that runs around 20MHz. This should provide you the low latency you need and more than ample MIPS capacity.

    best regards,
    mega

  78. mixers and feedback loop by Anonymous Coward · · Score: 0

    my understanding is that a mixer has a feedback loop the threshold on how much is allowed to go through that loop is the amount of echo, so your mission would be to break the feedback loop. Which will eliminate the echo. Sheez Most people want to MAKE an echo ;o)

  79. Feedback cancellation by Maroof · · Score: 1

    Guys.... Actually this does not require any computing power at all.. Get some highly directional microphones (directional cancellation)...and if that doesn't work, well, you can always get two microphones..... very near each other you point one at the sound source (person speaking) and one away (use two Shure SM-57's)....you using the balanced audio pins 2 and 3 you hook pin 3 of the away mic to pin 2 of the person mic and likewise with the other two, now hook the two combination up to your input...walla! Analog, non-powered background noise cancellation using the miracle of 180 degree phase cancellation. this equates to.... person + noise - (noise) = person talking... person + feedback - feedback = person.. I know this is hard to type out, but it's a technique I've been using in the pro-audio world since about 1980....and it still works...of course you could (and I usually do) use a very small mixer with variable levels on both mics.... that way you have some control over the '3 dimensional' 'sound' of the input....natural reflections from the source and natural slight delays and echos from the rooms environment. John

    1. Re:Feedback cancellation by Anonymous Coward · · Score: 0

      Uh, this only works if the noise source is exactly the same distance from each microphone...

  80. Doh! by Art+Tatum · · Score: 1

    That third link was to the Jack Project. And it was supposed to end that sentence and not go on and on and on.

  81. echo cancellation in major-label recordings by Sir+Elton+John · · Score: 1
    As someone "in the business," I thought I'd share my experiences with echo cancellation in major label recordings.

    I must admit that I've never dealt with echo cancellation as a large obstacle. It is generally something taken care of by the sound engineers along with everything else. And artists: when selecting an engineer, don't pay attention to name-dropping or even reputation if you haven't heard his (or her) work yourself. In this business, a DAT is worth a thousand words, and listening to what your engineer has done in the past will not only help you avoid difficult hires, but will give you context when working with this person.

    As for digital effects, I have had some experience with Akai products, but mostly regarding live performances. Again, I tend to leave the hard labour to my engineer(s). After all, I do not ask them to sing songs for me.

    --
    "I'm a rocket man / Rocket man burning out his fuse up here alone." - Sir Elton John
    1. Re:echo cancellation in major-label recordings by Golantig · · Score: 1

      Did you know that Sir John is a self confessed technophobe and doesn't even own a computer?

  82. Intel has software to do this by Anonymous Coward · · Score: 0

    It's seems to me that Intel developed a software solution for echo/noise cancellation for their video conferencing software. Problems are a) I beleive it's patented, b) it is VERY CPU intensive, and c) I'm not sure how well it worked. For example, every time the person speaking moves, it changes the time delay for the negative feedback. Why not just wear a headset?

  83. An alternate method to echo cancelation by BobTheBooser · · Score: 1

    If you sent the audio from each source as an individual (multiplexed packetized) stream, at each source you could just not play the stream (any packets) originating from that source.
    Simple and Effective, but would require sending more data than mixing one version at a central location and sending that version to all conections (but that would be silly anyway due to lag).
    But generaly you wouldnt have more than one person talking at a time and when it happens if you are using a decent compression targeted to voices (look at the compression schemes used in digital mobile phones (both GSM & CDMA)) this shouldnt be to much of a bandwidth problem anyway

  84. Code your own? by ironfroggy · · Score: 1

    If what this comment describes is correct, it wouldnt be touch to code this yourself. Find a decent Sound API you can use and cache the sound as it is received. Then remove that sound from the outstream with a small delay, which you might have to make optionally tweakable.

  85. Echo Cancels by Anonymous Coward · · Score: 0

    the audsl project has an echo cancellation component
    probaly not quite what you need but worth the look

    http://www.araneus.fi/audsl/

  86. You'll need a DSP by Anonymous Coward · · Score: 0

    There are two schools of processing digital audio signals: real-time and off-line. Anything that calls itself a software application that processes audio signals (like Cool Edit or MATLAB) by definition is off-line. This means you have to have the entire sound cut that you want to process available at once (like in a .wav). This can be done on a PC or any type of RISC, Mot processor. In order to filter or process a signal in real time (ie. while you are talking) it requires a circular buffer and a particular microprocessor architecture that is called a DSP. All real-time echo cancellation techniques require a DSP. There is no way to get around this, it has to do with the actual architecture of the uP. This is the reason why DSP's were created in the first place.

  87. No software, but a strategy by moogla · · Score: 1

    Most of your open source software that you'll find relating to this issue will be based on adaptive filtering, which when considering time delays over 1 second, this becomes infeasible, even at a 8000 Hz sampling (I imagine we have a few channels to process on each end). As a result, you're going to have to either buy some more hardware or write it yourself. Or you could find some geek willing to write a small package that does the following:

    Generate an impulse test signal on one end, and using the mic/speaker set up at all the other points of the VTC, measure the return. This will give you a bunch of ranges in time delays that you're interested in. You might want to do it for each other destination seperately. Then, to be more accurate, send out some sort of PSM sequence (this is only slightly more complicated than calling random() ). Correlate this signal against itself for a while (to account for any variations) to get a precise range of delays.

    You might be suprised to find the delays are extremely constant, if not dependant on the destination. A simple delay, invert, attenuate and mix will suffice at this point. Otherwise, you need to use an adaptive algorithm, but since you know the delay (roughly), you can just buffer up a bunch of data but only process a small window of it.

    --
    Black holes are where the Matrix raised SIGFPE
  88. VST by pompomtom · · Score: 1

    You could use a VST fx host, and use VST software gate plugins...

    --

    Buckets,

    pompomtom

    "There's an exception to every rule. Except for some rules"
  89. Try minicom by Webmoth · · Score: 2

    In your terminal emulator configuration, deselect "local echo".

    --
    Give me my freedom, and I'll take care of my own security, thank you.
  90. there is no spoon by Anonymous Coward · · Score: 0

    It is clear to me that virtually nobody responding has any clue about the problem. Those who understand the problem have simply replied "good luck" or "use the hardware solutions." I second these thoughts. I looked deeply into this problem, and it's inherently complex. de-convolution won't work unless you lock people's mic's and heads into position and never move anything large in that room. n-way echo cancellation is impossible in software in current computers. How close an approximation might be able to get is iffy, and should be assisted by other general tricks.

    In the end, after months of research and lots of experimental audio analysis and coding, with regard to n-way open air full duplex audio conferencing ... I've determined that headphones are fairly fashionable. And if you want to do mix minus, you need to never mix, just send all channels separately and you set your own volume to 0. (theed)

  91. ProSoundWeb.com by Anonymous Coward · · Score: 0

    These guys might be able to help you out: http://www.ProSoundWeb.com

  92. Megaflops in rock-hard real time by Paul+Johnson · · Score: 2
    There are two problems with a software-based echo canceller
    • Its seriously compute intensive. You need two buffers: a circular echo buffer containing the last N samples where N is the sample frequency times the longest echo you want to cancel, and another buffer of N samples which describes the echos you are hearing. The echo cancellation to be applied to each sample is the sum of the products of the elements in the two buffers. For radio you want to be sampling at 20KHz (giving a 10KHz Nyquist cut-off), so if you want to cancel a 0.1 second echo then you are having to do 2K multiplications per sample, at 20KHz, giving 40e6 multiplications per second. Conference phones (the kind of thing that sits on a table) can do this more cost effectively by handling only 8k samples/sec, which gives much saner numbers. In parallel to this you have to be doing a much slower (say, 10 or 20 times per second) bit of DSP to tell you what the echos are as people move around and change the acoustic properties of the room. I'm not sure about how thats done, but it probably involves an FFT somewhere.
    • The whole thing is the hardest of hard real time. The echo correction for each sample has to be fed back into the audio at exactly the right time to be out of phase with the original echo. If you get the time wrong then you will be in phase for at least one frequency in the echo, and that frequency will be amplified around the loop.
    This is simply not a job for stock hardware on stock OS. It needs dedicated DSP. Also I suspect you can save on the DSP by doing the buffers and multiplication in analogue hardware, but I don't know if that is cost effective in practice.

    Paul.

    --
    You are lost in a twisty maze of little standards, all different.
  93. use normailized lms by Anonymous Coward · · Score: 0

    Sorry, just too lazy to create a login.

    I'm right now implementing an echo canceller on a DSP as part of my B.Tech project. But the normalized LMS algorithm is fairly simple and efficient, and can be tried in software. If you wish, I can give you some simple code for it. However computation depends on the end to end delay. If for example, the two way delay is 200 ms (permitted maximum), you will need a filter of length 1600. Therefore, you will need to do 1600*2*8000 multiplications per second for speech sampled at 8kHz. However, if you do know the delay to a fair accuracy, you can use this to implement the filter smartly to reduce the filter length and maybe reduce computation by a factor of 100 to 20, depending on how well you know the delay.

    Rahul Alex Panicker
    IIT Madras, India.

  94. Better explanation of the problem... by Anonymous Coward · · Score: 0

    What you want in video teleconferencing is for the verbal communication to be natural. That means full-duplex, where one party can interrupt another, etc. But how does this work?

    Two locations, A and B have mics to pick up the local sounds and speakers to convey sounds from the other location. The problem is that when A talks to B, B's mic will pick up A coming in over the speakers and transmit it back to A, where it sounds like an echo. Long-haul network latencies tend to exacerbate the effect.I've experienced this, and it can be very disturbing to the conferees.

    So what you need is an audio echo cancellation processor at each location. The one at B compares the local mic signal to the feed its receiving from A and sends out B-A ... no echo.

    As one persone pointed out, the Access Grid does this, typically with hardware from Gentner, though there are a few other manufacturers. A Gentner capable of handling 8 mic inputs is ~$5k. Other commercial videoteleconferencing systems (like the Polycom VS4000 noted by someone else) typically also have this built in.

    Using headsets with mics is a less expensive alternative, as some have pointed out, but in general users don't like being tethered in place and tangled in wires.

    This is not about echo within A or B from the walls, ceiling, etc. It is not about electrical echo in the line between A and B, which is what the TellLabs systems someone else pointed to is for.

    And it is worth noting for comparison that the traditional speakerphones many of us are used to handle this problem in a slightly different way. When their mic picks up local sounds above a threshold, it automatically mutes the speaker, and you can't hear what the others on the call are saying. This is "half-duplex" and it makes it hard to interrupt someone, so the conversation can't be as natural as in full-duplex. I'll venture most people have experienced this type of speakerphone in operation. There are speakerphones capable of full-duplex operation from companies like Polycom which have built-in echo cancellation just like the videoteleconferencing systems. They tend to start at perhaps $300.

  95. Re:MeldStar by Anonymous Coward · · Score: 0

    Quite insightful. Maybe instead of prison for mudering someone, we make you stretch your asshole out and get fucked by gang of gypsys. That'd be funny. You'd be on your knees, taking it like a waif. You silly mofo.

  96. Pro Sound Web by Anonymous Coward · · Score: 0

    In regards to this, check out what this guy says about /.

    http://www.live-audio.com/messages/145051.html