PulseAudio 2.0 + Empathy = awesome

I’ve been meaning to blog about this for months. You may remember me being a fan of SFLphone. Well, turns out that for the past year, I’ve been using only Empathy to do my VoIP calls. All you need to do is install telepathy-rakia to have SIP support (and then you can use Ctrl+M to start dialing a number). Even though Empathy is not perfect, I like it: it’s a standard component of the GNOME desktop, it uses GStreamer and PulseAudio, and it keeps getting better every six months.

Recently, a significant piece of the puzzle has been fully solved in PulseAudio 2.0: real, rock-solid acoustic echo cancelling. Echo cancelling is not to be confused with echo concealment/suppression, which is basically just muting the other person while you’re talking (most phones and software applications—including Skype—do that, and it sucks).

As Christian nicely summarized, audio/video calls over the past few years have been a complex story. Unless you are close to GStreamer and Telepathy developers, it’s hard to see the big picture. Christian’s blog post is thus helpful, but I think it does not truly express how mindboggingly awesome this feature is, from a “What? Computers can do that? With Free Software?!” perspective.

A test call through XMPP/Jabber with Google Talk accounts. Notice that the echo-cancelled virtual device shows up in the GNOME volume control panel during the call. Yes, I cheated and used gnome-tweak-tool to change the control center’s colors to the dark variant.

Let me put it this way: I unplugged the headphones, called my laptop, put it into the garage, closed the door and went back to the previous room with the phone. I spoke, and I thought it was broken because the echo cancellation was working too well. I could not hear myself nor any audio artifacts. When I fetched someone else to go speak in front of the computer, it turned out that there was simply no echo whatsoever. Jaw on the floor. And that was with the laptop’s crappy 1-watt speakers; I then called across the globe to Bangalore, with my trusty USB microphone and 5.1 sound system, and it felt just like the other person was in the same room as me.

It works even if there’s ambient noise. The only way to confuse the echo canceller is to be in the same room with both the phone and the laptop. Not likely, unless you like talking to yourself.

Finally, no more fumbling around to pick up a call when your gear is not plugged in. Conference calls the way they were meant to be. Hands-free discussions while cooking or in a car. Holy smokes, we’re only missing holograms and flying cars… Folks, you know what to do.

11 thoughts on “PulseAudio 2.0 + Empathy = awesome

  1. I read this as: “Hands-free discussions while cooking *in* a car”, and I thought: Awesome, finally!

    Any idea which release of Fedora this will end up in ?

    Thanks

  2. Cooking in a car huh? I actually hesitated to write that. But it might give unsafe ideas to people :)

    These improvements will show up in Fedora 18 (which is what I tested with).

  3. I’m definitely excited about trying this. Just look at how annoying life is getting not to be.

  4. Does this work with playback and recording on separate devices? (I believe e.g. Ekiga requires you to use the mic input on the same card it outputs on in order to do echo cancellation)

  5. Quinn: it does work quite well with spearate devices as well. Ekiga (and PulseAudio before 2.0) use the Speex echo-canceller, which doesn’t deal with multiple devices well. The newe webrtc.org-based canceller that we’re using since PulseAudio 2.0 is much better at dealing with this.

    As a footnote, the improvements we added also include automatically adjusting the mic volume based on the actual input loudness, which helps makes the experience better.

  6. @Quinn: yes, this is what my USB microphone was used to test for, both with the 1 watt speakers and the surround sound system.

  7. @Bruno: respectfully, I couldn’t care less about Windows and Mac OS. The point of this blog is not to promote proprietary platforms and systems.

  8. Does empathy use the address book for sip addresses now? I really don’t want to enter sip addresses manually all the time. The bug has been open quite some time…

  9. Do you know if there’s any client that incorporates this kind of echo-cancelling without needing PulseAudio?

    As much as I love some of PulseAudio’s features in theory, in practice, I’ve been burned by “meet the new boss, same as the old boss” replacements for “fixed” 100% CPU (on one core) bugs so many times that I’ve lost interest in the “ooh, shiny!” factor of PulseAudio when dmix Just Works™ …even when I want to “/etc/init.d/timidity start”.

    (I also like to be able to run the same core software load-out on both my monster Athlon and the 2Ghz Celeron with 1GiB of RAM that I use as a minimum system requirements target for my own creations. PulseAudio is noticeably heavier on the latter even when I use the onboard AC’97 rather than a hardware-mixed Yamaha YMF724.)

  10. @spaetz: I don’t think Empathy scrapes the phone/SIP numbers from the addressbook through folks yet (well, I haven’t tested that one on 3.6), I’m sure the Empathy devs would welcome patches for this!

    @Stephan Sokolov: sadly no, unless you count Google’s talk plugin for “hangouts”.

Comments are closed.