-
Notifications
You must be signed in to change notification settings - Fork 202
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 not working on iOS #341
Comments
Thanks, the fix from that commit works well. The only issue is now the constant print statements that are emitted while the microphone is on:
|
Thanks for the feedback. I did not see it when testing this. |
It appears to only happen when using the final micStream = await _recorder.startStream(
RecordConfig(
encoder: AudioEncoder.pcm16bits,
echoCancel: true,
),
); When |
Echo cancel and auto gain are only available when streaming for now. |
You meant it's not available? I have the same issue with the following config: return recorder.startStream(
const RecordConfig(
echoCancel: true,
noiseSuppress: true,
encoder: AudioEncoder.pcm16bits,
numChannels: 1,
sampleRate: 16000,
bitRate: 16000,
),
); |
Available with iOS 13+ only |
my pod version is set to 15. both in podfile and xcode and my lock file is updated. |
Not sure but the version on record:
git:
url: [email protected]:llfbandit/record.git
path: record
ref: 809a5e47c473f8c7296efd9fa16627a30f8344fd |
Package version
5.1.1
Environment
Describe the bug
Enabling
RecordConfig.echoCancel
doesn't successfully remove the speaker audio from being picked up by the mic recording.My record config used for streaming is:
RecordConfig( encoder: AudioEncoder.pcm16bits, numChannels: 1, echoCancel: true, noiseSupress: true, );
To Reproduce
Steps to reproduce the behavior:
Have the app play audio through the speaker
Stop recording
Expected behavior
The mic should pick up no audio from the speaker, or at least significantly reduced audio from the speaker.
Additional context
Though the docs for this plugin show echo cancellation as unsupported on iOS, I believe this commit from two weeks ago enables it using
Voice-Processing I/O Unit
as per the Apple Docs.However according to What's New In AVAudioEngine at 0:45 there is an
audioEngine.inputNode.setVoiceProcessingEnabled(true)
method now which enables echo cancellation.I have tried this method is a separate plugin manually and it does seem to successfully stop the mic from hearing the speaker. (Note I had to also use
audioSession.overrideOutputAudioPort(.speaker)
to make playback come out of the speaker while recording, but that may be a separate issue).The text was updated successfully, but these errors were encountered: