nice-room-70150
03/01/2026, 10:14 PMtall-airline-16756
03/01/2026, 10:14 PMtall-airline-16756
03/01/2026, 10:15 PM.playAndRecord with appropriate options so the system applies the optimizations for two‑way audio.
• Avoid disabling voice processing (e.g., bypassVoiceProcessing: true) unless you specifically need raw mic data for custom audio processing. Disabling it will remove echo cancellation and usually causes the exact leakage you describe.
• Test with multiple devices and distances. Speaker leakage varies strongly by device model and how the user holds the phone.
Practical things to try now
1. Confirm voice processing is enabled
◦ If you are using LiveKit’s Swift/Flutter SDKs, ensure bypassVoiceProcessing (or similar flag) is not set to true.
1. Check AVAudioSession setup
◦ Use .playAndRecord and ensure mode is appropriate for voice, e.g., .voiceChat or .videoChat so iOS applies voice processing.
1. Advise users on UX
◦ Prompt users to lower speaker volume or move the device slightly away from the mic when on speaker mode.
◦ Offer an “earpiece” or headset option in the UI as an alternative to speaker.
1. If you need raw mic (voice processing disabled)
◦ Implement or integrate a software echo canceller/noise suppression pipeline on top of raw audio.
◦ Consider server/agent-side noise cancellation solutions (for example, external noise-cancellation agents) to complement client audio processing.
1. Test with and without Bluetooth/headsets
◦ Wired/Bluetooth headsets generally eliminate speaker→mic leakage entirely; test to confirm device-specific behavior.
If you want, I can help further with any of the following:
• Review the exact AVAudioSession configuration you’re using (paste the relevant code).
• Check your LiveKit SDK initialization flags (bypassVoiceProcessing or equivalent) and suggest changes.
• Suggest a plan for adding software-side echo cancellation if you must capture raw mic audio.
Which of those would you like to try next?
Sources: client-sdk-flutter | livekit/livekit_composite | DeepWiki | client-sdk-swift | livekit/livekit_composite | DeepWiki | Choosing the right noise cancellation for your agent | LiveKit