Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Echo cancellation disabled in OSX #1775

Closed
dghodgson opened this issue Aug 4, 2015 · 12 comments · Fixed by #4694
Closed

Echo cancellation disabled in OSX #1775

dghodgson opened this issue Aug 4, 2015 · 12 comments · Fixed by #4694
Assignees
Labels
client feature-request This issue or PR deals with a new feature help wanted Good community contribution opportunities macOS priority/P2 - Important

Comments

@dghodgson
Copy link

I know this has been a long-running issue, but I didn't see any mention of it in closed or open tickets in Github.

The echo cancellation feature has been missing from OSX for a long time (forever?), since OSX doesn't offer a method for getting all the audio streams in the system through CoreAudio. There are other applications out there that can achieve this, but supposedly they use a lower-level interface than CoreAudio.

If this is impossible for some reason, please leave a detailed explanation so that others don't ask for this feature in the future. If there is no reason, then lets have a meaningful discussion on how to implement it.

@Ginja
Copy link

Ginja commented Nov 24, 2015

+1

@mkrautz
Copy link
Contributor

mkrautz commented Nov 24, 2015

We need to change the AudioUnit used in CoreAudio.cpp to use the VoiceProcessingIO audio unit. However, it is not as simple as just changing the audio unit subtype, which caused various problems -- the CoreAudio code needs to be reworked somehow.

I don't recall the problems encountered when simply switching the audio unit subtype, but I believe it simply "broke" audio output and/or input.

@mkrautz mkrautz added the help wanted Good community contribution opportunities label Nov 24, 2015
@mike-sol
Copy link

+1 from me as well, alas, I don't speak the languages needed to help fix this

@mkrautz
Copy link
Contributor

mkrautz commented Nov 24, 2015

Also, the UI for Audio Input in the ConfigDialog needs to be able to show that it is using "System-provided Echo Cancellation".

@mkrautz mkrautz added this to the 1.3.0 milestone Jan 12, 2016
@mkrautz mkrautz self-assigned this Jan 12, 2016
@alakra
Copy link

alakra commented Feb 19, 2017

👍

@tiagoefreitas
Copy link

tiagoefreitas commented Aug 7, 2017

Any plans to fix this?

@saschaludwig
Copy link

saschaludwig commented Feb 4, 2018

Maybe this year? - Please. <3

@crertel-packlane
Copy link

This would be absolutely wonderful!

@Chris2000SP
Copy link

I'm wondering that under linux there is a switch to turn AEC on but it doesn't seem to be working. I heard that it should not work under Windows either, but unfortunately I can't test it myself.

I have already been asked to write a script to avoid the Echo problem. I started it but I remembered that there are other implementations, e.g. pulseaudio module-echo-cancel which runs stable since version 9.0 and works as well as mumble 1.1.x under Windows with ASIO on single speaker. That's why I didn't finish it.

I think the whole implementation of the echo cancellation has to be brought up to date.

@Kissaki Kissaki modified the milestones: 1.3.0, 1.3.1, 1.4.0 Aug 23, 2019
@Krzmbrzl Krzmbrzl added feature-request This issue or PR deals with a new feature macOS client labels Jan 25, 2020
@TerryGeng
Copy link
Contributor

I'd like to provide some follow-up to this old issue.

As indicated in https://developers.google.com/web/updates/2018/03/macos-native-echo-cancellation, since macOS 10.12, Apple included a native echo canceller in the OS.

Some useful code snippets can be found here: https://developer.apple.com/forums/thread/66953.

I'm wondering if there's anyone interested in implementing this.

TerryGeng added a commit to TerryGeng/mumble that referenced this issue Jan 16, 2021
…IP AU

Apple doesn't provide a way to hijack system audio stream into Mumble
so speedx's echo cancellation cannot work for Mac.
It was reported in https://developers.google.com/web/updates/2018/03/macos-native-echo-cancellation
that Mac has a native echo cancellation AU. This commit uses this
native AU to enable echo cancellation for Mac users.
Unfortunately, this function is poorly documented by Apple. The best
reference of this function is from Chromium's code,
https://github.com/chromium/chromium/blob/master/media/audio/mac/audio_low_latency_input_mac.cc

Limited support from Apple made invoking this AU a very unfriendly
task. Also, the subtleness of echo cancellation made it hard to be
tested. I would just submit this PR and see the reactions from other
testers.

Implement mumble-voip#1775.
TerryGeng added a commit to TerryGeng/mumble that referenced this issue Jan 16, 2021
…IP AU

Apple doesn't provide a way to hijack system audio stream into Mumble
so speedx's echo cancellation cannot work for Mac.
It was reported in https://developers.google.com/web/updates/2018/03/macos-native-echo-cancellation
that Mac has a native echo cancellation AU. This commit uses this
native AU to enable echo cancellation for Mac users.
Unfortunately, this function is poorly documented by Apple. The best
reference of this function is from Chromium's code,
https://github.com/chromium/chromium/blob/master/media/audio/mac/audio_low_latency_input_mac.cc

Limited support from Apple made invoking this AU a very unfriendly
task. Also, the subtleness of echo cancellation made it hard to be
tested. I would just submit this PR and see the reactions from other
testers.

Implement mumble-voip#1775.
@TerryGeng
Copy link
Contributor

TerryGeng commented Jan 16, 2021

I made an experimental implementation in #4694 with the VoiceProcessingIO AU mentioned by @mkrautz, and studied Chrome's implementation.

I hope people in this thread may help me test it and kindly provide some feedback.

Thanks :)

@Krzmbrzl Krzmbrzl linked a pull request Jan 16, 2021 that will close this issue
@ProjectPatatoe
Copy link
Contributor

mumble wiki has a dead link in the FAQ regarding this topic (points to sourceforge). The wiki is what appeared in web search. Should probably point it to this Issue. https://wiki.mumble.info/wiki/FAQ/English#No_Echo_Cancellation_on_Mac_OS_X

TerryGeng added a commit to TerryGeng/mumble that referenced this issue Feb 5, 2021
…IP AU

Apple doesn't provide a way to hijack system audio stream into Mumble
so speedx's echo cancellation cannot work for Mac.
It was reported in https://developers.google.com/web/updates/2018/03/macos-native-echo-cancellation
that Mac has a native echo cancellation AU. This commit uses this
native AU to enable echo cancellation for Mac users.
Unfortunately, this function is poorly documented by Apple. The best
reference of this function is from Chromium's code,
https://github.com/chromium/chromium/blob/master/media/audio/mac/audio_low_latency_input_mac.cc

Limited support from Apple made invoking this AU a very unfriendly
task. Also, the subtleness of echo cancellation made it hard to be
tested. I would just submit this PR and see the reactions from other
testers.

Implement mumble-voip#1775.
TerryGeng added a commit to TerryGeng/mumble that referenced this issue Feb 10, 2021
…IP AU

Apple doesn't provide a way to hijack system audio stream into Mumble
so speedx's echo cancellation cannot work for Mac.
It was reported in https://developers.google.com/web/updates/2018/03/macos-native-echo-cancellation
that Mac has a native echo cancellation AU. This commit uses this
native AU to enable echo cancellation for Mac users.
Unfortunately, this function is poorly documented by Apple. The best
reference of this function is from Chromium's code,
https://github.com/chromium/chromium/blob/master/media/audio/mac/audio_low_latency_input_mac.cc

Limited support from Apple made invoking this AU a very unfriendly
task. Also, the subtleness of echo cancellation made it hard to be
tested. I would just submit this PR and see the reactions from other
testers.

Implement mumble-voip#1775.
TerryGeng added a commit to TerryGeng/mumble that referenced this issue Feb 11, 2021
…IP AU

Apple doesn't provide a way to hijack system audio stream into Mumble
so speedx's echo cancellation cannot work for Mac.
It was reported in https://developers.google.com/web/updates/2018/03/macos-native-echo-cancellation
that Mac has a native echo cancellation AU. This commit uses this
native AU to enable echo cancellation for Mac users.
Unfortunately, this function is poorly documented by Apple. The best
reference of this function is from Chromium's code,
https://github.com/chromium/chromium/blob/master/media/audio/mac/audio_low_latency_input_mac.cc

Limited support from Apple made invoking this AU a very unfriendly
task. Also, the subtleness of echo cancellation made it hard to be
tested. I would just submit this PR and see the reactions from other
testers.

Implement mumble-voip#1775.
Krzmbrzl pushed a commit to TerryGeng/mumble that referenced this issue Feb 11, 2021
…IP AU

Apple doesn't provide a way to hijack system audio stream into Mumble
so speedx's echo cancellation cannot work for Mac.
It was reported in https://developers.google.com/web/updates/2018/03/macos-native-echo-cancellation
that Mac has a native echo cancellation AU. This commit uses this
native AU to enable echo cancellation for Mac users.
Unfortunately, this function is poorly documented by Apple. The best
reference of this function is from Chromium's code,
https://github.com/chromium/chromium/blob/master/media/audio/mac/audio_low_latency_input_mac.cc

Limited support from Apple made invoking this AU a very unfriendly
task. Also, the subtleness of echo cancellation made it hard to be
tested. I would just submit this PR and see the reactions from other
testers.

Implement mumble-voip#1775.
Krzmbrzl pushed a commit to TerryGeng/mumble that referenced this issue Feb 11, 2021
…IP AU

Apple doesn't provide a way to hijack system audio stream into Mumble
so speex's echo cancellation cannot work for Mac.
It was reported in https://developers.google.com/web/updates/2018/03/macos-native-echo-cancellation
that Mac has a native echo cancellation AU. This commit uses this
native AU to enable echo cancellation for Mac users.
Unfortunately, this function is poorly documented by Apple. The best
reference of this function is from Chromium's code,
https://github.com/chromium/chromium/blob/master/media/audio/mac/audio_low_latency_input_mac.cc

Limited support from Apple made invoking this AU a very unfriendly
task. Also, the subtleness of echo cancellation made it hard to be
tested. I would just submit this PR and see the reactions from other
testers.

Implement mumble-voip#1775.
Krzmbrzl added a commit that referenced this issue Feb 11, 2021
Apple doesn't provide a way to hijack the system audio stream into Mumble
so speex's echo cancellation cannot work for Mac.
It was reported in https://developers.google.com/web/updates/2018/03/macos-native-echo-cancellation
that Mac has a native echo cancellation AU. This commit uses this
native AU to enable echo cancellation for Mac users.
Unfortunately, this function is poorly documented by Apple. The best
reference of this function is from Chromium's code,
https://github.com/chromium/chromium/blob/master/media/audio/mac/audio_low_latency_input_mac.cc

Limited support from Apple made invoking this AU a very unfriendly
task. Also, the subtleness of echo cancellation made it hard to be
tested. I would just submit this PR and see the reactions from other
testers.

Implement #1775.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client feature-request This issue or PR deals with a new feature help wanted Good community contribution opportunities macOS priority/P2 - Important
Projects
None yet
Development

Successfully merging a pull request may close this issue.