Closed bataemperor closed 2 years ago
Hey @bataemperor
I have a couple follow up questions.
Thanks
Hi @aaalaniz I will answer your questions :
1) I'm experiencing echo with the speaker. I haven't tried with earpiece since it not usable in our app. 2) I tried to change codec as you suggested (iSAC) but heard echo again.
I'm using audioSink from your examples to record both local and remote audio tracks and afterward I'm mixing it together with local video that I record using MediaRecorder. I'm aware of recording API that you provide. I used it but it didn't work for me because video quality wasn't good enough so I had to switch to recording it locally.
Hey @bataemperor
Thanks for the confirmation and additional details. I don't think the audio sink usage should impact the echo cancellation performance. I have a couple of follow ups.
WebRtcAudioUtils.setWebRtcBasedAcousticEchoCanceler | WebRtcAudioUtils.setWebRtcBasedNoiseSuppressor | WebRtcAudioUtils.setWebRtcBasedAutomaticGainControl | Echo Score (1-2) |
---|---|---|---|
false | false | false | |
false | false | true | |
false | true | false | |
false | true | true | |
true | false | false | |
true | false | true | |
true | true | false | |
true | true | true |
I'm sending you room where echo is observed.
roomName = CCqKgob85tYbMk5nWJR6YdjBB4l2H76fQrdmgGRrdmf8lNKJkZUFfPk1Rec1590278846054 roomSID = RM0d2ba18c81a90da29eabc00adb30691a
I will run this tests and let you know the results.
Thanks
Hey @aaalaniz I am facing the same echo issue. I have execute the above test and is all the cases I am getting echo. My last roomsid is RMe4a90c7d62df5af4b425ece3d4eeebec. I am getting echo on Samsung A20s and participant phone is Pixel 2 XL. Its clear that pixel 2 xl is creating echo for its participants. I have tried every thing which is written here https://github.com/twilio/video-quickstart-android#troubleshooting-audio. Echo is affecting call quality of our customers. Please suggest me something to get rid of this echo issue.
HI @aaalaniz . I've run test cases and I'm getting echo in all cases as well. Please let me know if you have some conclusions about WebRTC stats that you mentioned.
Hey everyone,
@himanshu-my if you are experiencing echo on a pixel device, then it is most likely due to OpenSLES. We now disable OpenSLES by default in Video Android 5.6.0, so please sure to use this version or explicitly disable it as stated in the trouble shooting audio guide.
@bataemperor Unfortunately, I think I'm out of leads here. I checked the WebRTC stats and the only thing I found was confirming the echo. I see large spike in audio levels on the server but not a lot of evidence to explain why.
I'll have to order a Xiaomi MI 8 and see what I can do locally. In general, I have seen that the Xiaomi does find interesting corner cases so it will be good to have this device in our inventory.
In the meantime, the only thing I can suggest is to encourage your users to use a headset speaker or wired/bluetooth headset. We now have a convenient library AudioSwitch that helps set up managing these audio devices in a few lines of code for real-time communication applications.
Thank you.
@aaalaniz I am already using latest version which is 5.6.0 in which your have already disabled OpenSLES by default. We are not getting echo only on Pixel but our customers reported that they are getting echo on Samsung devices also and this echo issue is affecting our app quality. Can you please provide any concrete resolution for it?
Hey @himanshu-my
Unfortunately the only thing I can offer is similar to what I recommended to @bataemperor
I suggest you encourage your users to use a headset speaker or wired/bluetooth headset. We now have a convenient library AudioSwitch that helps set up managing these audio devices in a few lines of code for real-time communication applications.
I ordered the Xiaomi device to try to see what we can do locally. I will provide an update when I have had a change to experiment locally.
Thanks
Hi @aaalaniz, we did encourage our users to use a headset but some of them reported that echo is still there on some devices. Do you have some resolution for this problem?
Hey @bataemperor
Unfortunately, I have no resolution at this time. We now have the Xiaomi MI 8 device and will be performing some experiments with echo cancellation.
Thank you
Any update on this?
@aaalaniz any update? I'm also experiencing echo when calling to a Pixel 2 device.
Hi @aaalaniz , do you have any update on this issue? I'm facing some very tedious echo when joining video rooms from a Xiaomi MI9 device (with stock MIUI 12).
Anyone have an update on this? Tried everything with a Pixel 2 and can't seem to get the echo to stop
Same problem here, Xiaomi Redmi Note 8, no updates yet?
Same issue here with browser, video-quickstart-android, and twilio-video-app-android. When we have two tablets connected, they combine to produce an insane echo, see video here. WeChat did not have the same problem; I can't seem to figure out why.
Code - Tried the WebRTC options to no avail. Otherwise we did not tweak the source code. Reproduces How Often - Tablet to laptop produces mild echo, tablet to tablet calls produce extreme echo. Both occur 100% of the time. Logs - None Video Android SDK - 6.0.0 Android Version - 8.1 Android Device - Hopestar WA1012T. We are happy to ship a tablet for testing if it would help.
@alanbucknum did you make any headway here? We have a similar situation. We're considering implementing custom Acoustic Echo Cancellation / Noise Suppression
@timusus Sorry, we did not. Would love to hear if you have success with the custom method. We tested on some mainstream tablets (e.g. Samsung), which worked great, but ours did not.
Hello Everyone,
This was also happening to our video calling app on some Samsung devices. After a lot of troubleshooting I realised what the problem is, it something to do with a property that determined which audio settings the app will use. To set this in the VOIP mode, I set the mode
property for my AudioManager
object to 3(in_call_communication). This fixed the issue.
Here's my snippet of code:
audioManager = applicationContext.getSystemService(Context.AUDIO_SERVICE) as AudioManager
audioManager.isSpeakerphoneOn = true
audioManager.mode = 3;
Hope this helps folks out there struggling with the same issue.
Thanks for sharing @Shoshin23 !
Also, the AudioSwitch library sets the AudioManager mode to this same value (MODE_IN_COMMUNICATION = 3) when it is activated. We highly recommend using AudioSwitch to provide a better audio device management experience during a real time communication call.
Thanks @Alton09! I'm taking a look at it so we can implement it within our app. Didn't know this existed. 👍
@Shoshin23 @Alton09 by using audioManager.mode = 3 there is no more echo on Samsung devices but it leads to another problem where if the user is using Bluetooth headphones then they aren't able to hear anyone from the Bluetooth earpiece instead the audio is routed to the device's Earpiece. UPDATE: Tested this again on the same device though the in-call echo disappeared the person who is speaking is able to hear the echo.
@aaalaniz any update on the echo issue? Facing heavy echo on few Samsung devices.
Device name: Samsung Galaxy F41 & Samsung Galaxy M30s Android version: 11 Twilio Video SDK: 5.12.0
Hey guys! For June 2021, I was able to remove the insane echo sound by setting the mode of the audio like so:
(getSystemService(Context.AUDIO_SERVICE) as AudioManager).apply {
isSpeakerphoneOn = true
mode = AudioManager.MODE_IN_COMMUNICATION
}
via Java
final AudioManager audioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
audioManager.setSpeakerphoneOn(true);
audioManager.setMode(AudioManager.MODE_IN_COMMUNICATION)
Hi @meSmashsta . As mentioned in the comment above, if you use the AudioSwitch library it sets this up for you as well as other audio management benefits.
@Alton09 yes thank you for that, for the moment my solution is good enough for my use case, but yeah will surely use it in the future for sure
Description
Helo, I'm using Twilio video in my android app. The type of room is peer-to-peer. The version that I'm using is video-android:5.6.0. I have problem with echo on some devices, but not on all of them. I experienced it on Xiaomi MI 8 that I'm using, but other users also reported the same problem on couple of other devices. I previosly had problem with noise and I solved it by following #troubleshooting-audio on your github docs. [Description of the issue]
Steps to Reproduce
Users connect to peer-to-peer room.
Code
I used // Use software AEC WebRtcAudioUtils.setWebRtcBasedAcousticEchoCanceler(true);
It solved the problem with noise, but echo remains on some devices.
Expected Behavior
Not to hear the echo.
Actual Behavior
Can hear echo
Reproduces how Often
Reproduced on some devices
Logs
I attached logs here : https://pastebin.com/WeghcYVy
Versions
All relevant version information for issue.
Video Android SDK
5.6.0
Android API
29
Android Device
Xiaomi MI 8, and couple of other, don't have exact info