Signal-Android icon indicating copy to clipboard operation
Signal-Android copied to clipboard

Voice/Video chat beta: Missing Echo Cancellation

Open Spindel opened this issue 9 years ago • 109 comments

I have:

  • [x] searched open and closed issues for duplicates
  • [x] read https://github.com/WhisperSystems/Signal-Android/wiki/Submitting-useful-bug-reports

Bug description

When doing an audio call on Speaker mode in the new Voice/Video call beta enabled, you can hear your own voice clearly reflected through the microphone. This causes a rather high level of annoyance as you hear your own voice, with a double round-trip time in between, making it a very sad communication companion that constantly interrupts you when you speak.

Steps to reproduce

  • Enable voice calling beta
  • Put both phones on speaker mode
  • Pull up volume a bit
  • Speak slowly and hear your own voice with a delay, routed through the aether.

Actual result: Annoyingly noise of your own voice

Expected result: Effective echo cancellation on the remote side that cancels out the noises from the speaker against the microphone.

Screenshots

Not applicable

Device info

Device 1: Fairphone 2 Device 2 Nexus 5x Android version: 7.1.1 and the current fairphone (5/6 something?) Signal version: Pass.

Link to debug log

Not applicable.

Spindel avatar Feb 16 '17 22:02 Spindel

Do you observe this on both ends?

Just to be sure: are the devices isolated from each other / in different rooms?

haffenloher avatar Feb 16 '17 23:02 haffenloher

Some devices have broken hardware AEC. If you hear echo, the problem is on the other end (that device isn't canceling out the speaker audio from the microphone input), so we'd need information about the device on the other side.

moxie0 avatar Feb 17 '17 00:02 moxie0

It was observed on one end, devices are isolated from each other with a nice wide swath of ocean and some land.

The device that would be missing AEC would be the Fairphone2, which is also, sadly, the one that I don't have here to get specifications & logs from.

Spindel avatar Feb 17 '17 00:02 Spindel

I have a Fairphone 2. I will try to reproduce this issue in the next few days.

FeuRenard avatar Feb 17 '17 10:02 FeuRenard

Just tested it. I heard a very clear echo speaking into device XU -> FP's echo cancellation failed. I heard the echo cancellation working speaking into device FP -> XU's echo cancellation works fine. There is always some soft noise coming from FP's earphone but directly after I spoke a word into FP this noise was somehow disturbed. I interpreted this as working echo cancellation.

tl;dr I can reproduce this issue and it's device FP's fault.

Device info FP

Device: Fairphone 2 Android version: 5.1.1 Signal version: 3.29.6

Device info XU

Device: Sony Xperia U Android version: 4.4.4 Signal version: 3.29.6

FeuRenard avatar Feb 17 '17 17:02 FeuRenard

Thank you for verifying this. Can you follow up with upstream fairphone?

On Fri, 17 Feb 2017, 18:02 FeuRenard, [email protected] wrote:

Just tested it. I heard a very clear echo speaking into device XU -> FP's echo cancellation failed. I heard the echo cancellation working speaking into device FP -> XU's echo cancellation works fine. There is always some soft noise coming from FP's earphone but directly after I spoke a word into FP this noise was somehow disturbed. I interpreted this as working echo cancellation.

tl;dr I can reproduce this issue and it's device FP's fault. Device info FP

Device: Fairphone 2 Android version: 5.1.1 Signal version: 3.29.6 Device info XU

Device: Sony Xperia U Android version: 4.4.4 Signal version: 3.29.6

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/WhisperSystems/Signal-Android/issues/6241#issuecomment-280706923, or mute the thread https://github.com/notifications/unsubscribe-auth/ABmI5i6ZzRlqpZSWtWNcB7Rd00LKa-LWks5rddK7gaJpZM4MDosn .

Spindel avatar Feb 17 '17 17:02 Spindel

I tested the dialer app with my landline phone and I hear no echo speaking to my landline phone. But maybe the landline phone can also do echo cancellation for the other side...

Can you follow up with upstream fairphone?

I just revived this thread: https://forum.fairphone.com/t/echo-with-google-hangout/15745

FeuRenard avatar Feb 17 '17 17:02 FeuRenard

@FeuRenard I can try blacklisting the fairphone from hardware AEC in the webrtc code, can you give me the fairphone2's "ro.product.model" string?

moxie0 avatar Feb 17 '17 19:02 moxie0

In settings -> about phone -> model number it says "FP2". Is this what you want? If not: From where can I get this string?

FeuRenard avatar Feb 17 '17 19:02 FeuRenard

Yeah I think that's it

moxie0 avatar Feb 17 '17 19:02 moxie0

@FeuRenard can you try this test apk on your FP2 and see if that helps?

moxie0 avatar Feb 17 '17 20:02 moxie0

I tried. Good news: echo cancellation seems to work with this apk. Bad news: Fairphone 2 reboots after a couple of seconds.

FeuRenard avatar Feb 17 '17 20:02 FeuRenard

Hah, what!? Just... reboots?

moxie0 avatar Feb 17 '17 20:02 moxie0

Yes. 4 out of 5 times I tried it rebooted. I sent you logcat of the final seconds before reboot via e-mail if you are interested.

FeuRenard avatar Feb 17 '17 21:02 FeuRenard

@FeuRenard can you explain how to install this apk (in the community forum for example)? Can i run it alongside my normal signal installation? Then I could try and test it on my Fairphone 2 tomorrow...

rainerzufall avatar Feb 17 '17 21:02 rainerzufall

Sounds like the fairphone has some issues. Either they need to fix the AEC or they need to fix the crash, I don't think there's anything else I can do.

moxie0 avatar Feb 17 '17 21:02 moxie0

My redmi note 3 pro is displaying the same issues: my conversation partner is complaining about echo, but on my end everything is fine.

If you push your commits from your testapk somewhere i can give it a shot.

getprob says:

[ro.product.board]: [MSM8952]
[ro.product.brand]: [Xiaomi]
[ro.product.cpu.abi]: [arm64-v8a]
[ro.product.cpu.abilist]: [arm64-v8a,armeabi-v7a,armeabi]
[ro.product.cpu.abilist32]: [armeabi-v7a,armeabi]
[ro.product.cpu.abilist64]: [arm64-v8a]
[ro.product.device]: [kenzo]
[ro.product.locale]: [en-US]
[ro.product.manufacturer]: [Xiaomi]
[ro.product.model]: [Redmi Note 3]
[ro.product.name]: [cm_kenzo]

Despite it saying redmi note 3 it is a redmi note 3 pro, which has slightly different hardware.

Trolldemorted avatar Feb 20 '17 10:02 Trolldemorted

Just for the record: My conversation partner even complains about hearing herself while none of us uses the speaker mode. She uses an iPhone SE and I use a Fairphone 2.

FeuRenard avatar Feb 28 '17 11:02 FeuRenard

@FeuRenard interesting. Sounds just like something I experienced when calling a Xiaomi Mi4 (ro.product.model = "MI 4LTE"):

  1. I heard a loud, clear, and very disturbing echo with a delay of maybe 1-2 seconds, regardless of whether the Mi4's speaker was on or off.
  2. The first words of every sentence I spoke could be heard clearly on the Mi4, but (roughly) as soon as I started hearing the echo, my voice started to drop out on the Mi4. To be understood, I had to stop every few words and wait till the echo subsided.

We tried every combination of the three blacklists in WebRtcAudioUtils.java. The minimal change required to make it work properly was to add "MI 4LTE" to both the OPEN_SL_ES and the AEC blacklists. Tested in a 40 minute video call with speaker mode on and off, no problems.

If you're interested in investigating this further, I could provide you with test builds of the AppRTC demo app with and without your model blacklisted.

haffenloher avatar Feb 28 '17 13:02 haffenloher

I've noticed similar echo issues with a Samsung S5? Is there any similarity between the hardware on these devices?

skulumani avatar Mar 01 '17 18:03 skulumani