How to AEC(Audio Echo Cancellation) in flutter

62 views Asked by At

I am using text flutter library to recognize user input from microphone, what I want for my app is to microphone not to detect any output from speaker.

I hope doing it in flutter, but if it could solve in swift then its fine.

I have tried to use audio_session like

AudioSession session = await AudioSession.instance;
await session.configure(AudioSessionConfiguration(
      avAudioSessionCategory: AVAudioSessionCategory.playAndRecord,
      avAudioSessionCategoryOptions:
          AVAudioSessionCategoryOptions.defaultToSpeaker,
      avAudioSessionMode: AVAudioSessionMode.videoChat,
));

before playing my audio, but it doesn't working.

1

There are 1 answers

0
Tim On

You can use an echo cancellation software. The most professional way is to integrate it in your code but the simplest test can be to download a virtual audio device to perform the echo cancellation on your microphone without any integration. You can try SoliCall Pro: connect the speaker & microphone and activate the echo cancellation toggle.