2

I'm sure this has been asked before but I can't seem to find anything about this, in theory, is it possible to write an audio driver which takes the incoming audio (from microphone), and compares it to outgoing audio (sound played through speakers/headset).

The reason I ask?

I know for a fact lots of gamers would love to be able to play sound through their speakers instead of their headsets, but when they use VoIP programs people tend to complain a lot about echoes & ambient noise.

As for a more tangible example:

User plays music through speakers, but when talking on VoIP (without any volume reduction), the driver then takes that incoming sound & "subtracts" the outgoing audio from it, which leads to the other VoIP users not being able to hear the music/themselves talking, but they will still be able to hear the user.

Note: I'm not entirely sure if this is possible even in theory due to my lack of understanding of the workings of sound (be it digital signals and actual waveforms).

Yorrick
  • 23
  • 2
  • I think some [very similar technology](http://en.wikipedia.org/wiki/Noise-cancelling_headphones) already exists. –  Jun 08 '15 at 13:34
  • If you have no understanding of sound its going to be difficult! It is possible - [WASAPI](https://msdn.microsoft.com/en-us/library/windows/desktop/dd371455%28v=vs.85%29.aspx) is the sound driver system for Windows, and already has some [support for AEC](https://msdn.microsoft.com/en-us/library/windows/desktop/dd316551%28v=vs.85%29.aspx) – gbjbaanb Jun 08 '15 at 13:40
  • @Snowman I'm fairly sure you read the question wrong, I'm talking about the outgoing (speaker) sound being "filtered" out of the ingoing (microphone) sound. – Yorrick Jun 08 '15 at 13:46
  • @Yorrick and like I said, the technology is very similar, not identical. Perhaps there is an algorithm there that you could start with? I do not have an answer for you, I am just trying to help. –  Jun 08 '15 at 13:48
  • 2
    It's called Echo Cancellation, if you want to research it. – Robert Harvey Jun 08 '15 at 14:23

1 Answers1

2

Automatic acoustic echo cancellation is routinely done for cellphones and speakerphones.

It uses a least mean squares adaptive filter. (Usually, the normalized least mean squares filter is used, along with a pre-whitening filter.)

Wrapping your head around the technology is not all that easy. The best textbook I've found is Haykin's "Adaptive Filters". Widrow & Stearns "Adaptive Signal Processing" is not as clear. Both texts assume a basic understanding of digital signal processing and digital filters.

There's a Wikipedia article.

John R. Strohm
  • 18,043
  • 5
  • 46
  • 56
  • I see, I was somehow convinced that AEC was simply software which lowered the speaker volume when talking over VoIP (which is happening to me and is horribly annoying). Thanks :) – Yorrick Jun 08 '15 at 14:54