Microphone Feedback in iOS device

ett

Member
Good day.
In WebSDK applications, use voice speaker or headset to eliminate echo
In Android SDK, try to use googEchoCancellation, googNoiseSupression parameters as shown in Phone example
How about for iOS?

I'm having trouble with acoustic feedback on iOS.
How can I implement echo cancellation or how to reduce acoustic feedback?
 

Max

Administrator
Staff member
Good day.
How would you implement this for iOS?
googEchoCancellation and another constraints are probably not supported in iOS, so we raised the ticket WCS-3036 to investigate how to integrate echo cancellation to iOS SDK. Will let you know results here.
A quick workaround is to use headphones.
 

ett

Member
Thanks for your reply.
There are several things I want to tell you.

1. When I tested with two devices in the same room, I got feedback, but when each was in a different room, I got no feedback.
Of course, the audio was played at maximum volume from the device speakers.
FPWCSApi2StreamOptions does not specify anything except the audio=true.
Perhaps echo cancellation is enabled by default. But if so, I would like to know how to disable it.


2. When I have problems with WCS iOS SDK could not building, I added GoogleWebRTC to my Podfile and use it.
And GoogleWebRTC seems to have googEchoCancellation.

FYI: Build error for combination of WCS-iOS-SDK@2.6.4 and WebRTC@63.11.20455(via CocoaPods)
Code:
Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_RTCDefaultVideoDecoderFactory", referenced from: objc-class-ref in FPWCSApi2(FPWCSApi2WebRTCMediaProvider.o)
  "_OBJC_CLASS_$_RTCDefaultVideoEncoderFactory", referenced from: objc-class-ref in FPWCSApi2(FPWCSApi2WebRTCMediaProvider.o)
So, I use GoogleWebRTC@1.1.27828(via CocoaPods)

3. I tried setting {"googEchoCancellation":"false"}, or {mondatory:{googEchoCancellation:"false"}} into FPWCSApi2StreamOptions.custom: NSMutableDictionary, but there seemed to be no change in behavior and SDP.
Is FPWCSApi2StreamOptions.custom parameter not related to WebRTC?
 
Last edited:

Max

Administrator
Staff member
1. When I tested with two devices in the same room, I got feedback, but when each was in a different room, I got no feedback.
There is a physical feedback when testing two devices in the same room. This echo can not be cancelled by any sortware or hardware tweaks except headphones.
Echo cancelletion feature is intended mostly to prevent feedback when publishing and playing the same stream on the same phone.
2. When I have problems with WCS iOS SDK could not building, I added GoogleWebRTC to my Podfile and use it.
And GoogleWebRTC seems to have googEchoCancellation.
Well, we check it and try to implement this constraint in ticket WCS-3036
So, I use GoogleWebRTC@1.1.27828(via CocoaPods)
build
In the latest iOS SDK build 2.6.10 we cancelled CocoaPods WebRTC builds in prefer to custom build due to microphone permissions issue on iOS 14. Please note that in this buils a sample project is also changed.
Is FPWCSApi2StreamOptions.custom parameter not related to WebRTC?
No, this is for custom data such as appKey or ACL keys in CDN.
 

ett

Member
Many thanks for your reply.

I'm sure you understand my intention, but I'll make a few corrections.
- Perhaps echo cancellation is enabled by default. But if so, I would like to know how to disable it.
+ Perhaps echo cancellation is enabled by default. But if so, I would like to know how to enable/disable echoCancellation, googEchoCancellation, noiseSupression, googNoiseSupression and so on.

There is a physical feedback when testing two devices in the same room. This echo can not be cancelled by any sortware or hardware tweaks except headphones.
Echo cancelletion feature is intended mostly to prevent feedback when publishing and playing the same stream on the same phone.
I understood.

Well, we check it and try to implement this constraint in ticket WCS-3036
Thanks for the action.
By the way, is the ticket you mentioned is open to the public?

In the latest iOS SDK build 2.6.10 we cancelled CocoaPods WebRTC builds in prefer to custom build due to microphone permissions issue on iOS 14. Please note that in this buils a sample project is also changed.
Okay. I'll try the latest build.

No, this is for custom data such as appKey or ACL keys in CDN.
Thanks for the clear answer.
I understand that the API that defines the constraints of WebRTC exists only in WCS Android SDK.
 

Max

Administrator
Staff member
By the way, is the ticket you mentioned is open to the public?
We use the forum as public bug tracker. This topic is tagged with ticket id, and we'll let you know about ticket state changing (usually, when it will be fixed)
I understand that the API that defines the constraints of WebRTC exists only in WCS Android SDK.
And in Web SDK too.
But in iOS SDK constraints are historycally limited.
 

ett

Member
Hi, Max. Thanks for your reply, and I understand it.

I'm pleased to report that everything is working fine using the WCS iOS SDK 2.6.23.

The echo cancellation is automatically enabled by setting AVAudioSessionModeVoiceChat, AVAudioSessionModeVideoChat.
I don't know if it can do this in the WebRTC settings, but might be able to use AudioUnitSetProperty in this way.

Note that I am already not interested in enabling or disabling echo cancellation.
(I am slightly interested in noise suppression, that is because of https://developers.google.com/web/updates/2017/12/disabling-hardware-noise-suppression
But I don't care about it anymore. Because everything is working well.)
 
Last edited:
Top