Skip to content
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

[bug] Agent interrupts itself when on speaker phone #633

Open
torphix opened this issue Nov 9, 2024 · 2 comments
Open

[bug] Agent interrupts itself when on speaker phone #633

torphix opened this issue Nov 9, 2024 · 2 comments

Comments

@torphix
Copy link

torphix commented Nov 9, 2024

Describe the bug
When using the flutter sdk with agent sdk if the agent is on speaker phone it interrupts itself whilst its talking. ie: it triggers the VAD system from its own voice. Note this only happens whilst the agent is on speaker phone.

To Reproduce
git clone the client-sdk-flutter and run the example
deploy a livekit agent in the cli
Connect to the agent room and switch to speaker phone.
Have the agent talk and observe the interruption detection being triggered by its own voice

Expected behavior
I would assume that this is a bug and echo cancellation would remove the VAD trigger by the agents own voice

Platform information
Android

  • Flutter version:
  • [✓] Flutter (Channel stable, 3.24.4, on macOS 14.5 23F79
    darwin-arm64, locale en-GB)
    • Flutter version 3.24.4 on channel stable at
    /Users/jessedeng/development/flutter
    • Upstream repository
    https://github.com/flutter/flutter.git
    • Framework revision 603104015d (2 weeks ago),
    2024-10-24 08:01:25 -0700
    • Engine revision db49896cf2
    • Dart version 3.5.4
    • DevTools version 2.37.3

[✓] Android toolchain - develop for Android devices
(Android SDK version 35.0.0)
• Android SDK at /Users/jessedeng/Library/Android/sdk
• Platform android-35, build-tools 35.0.0
• Java binary at: /Applications/Android
Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build
17.0.11+0-17.0.11b1207.24-11852314)
• All Android licenses accepted.

  • Plugin version:
    livekit_client: ^2.3.0
    livekit==0.18.0
    livekit-agents==0.11.0
    livekit-api==0.7.1
    livekit-plugins-openai==0.10.5
    livekit-protocol==0.6.0

  • Flutter target OS:
    Android

  • Flutter target OS version:
    Android

Thanks

@cloudwebrtc
Copy link
Contributor

hi, What model of mobile phone are you using? Does this device properly cancel the echo when the speakerphone is on for two-way voice calls?

@schedawg74
Copy link

schedawg74 commented Jan 9, 2025

Same for me on iOS 18.2.

I've setup the example app with a VoiceAgentPipeline like in the livekit docs. However the agent interrupts itself when I'm not muting myself.

Does this device properly cancel the echo when the speakerphone is on for two-way voice calls?

How?

    AudioCaptureOptions(
      deviceId: _selectedAudioDevice!.deviceId,
      echoCancellation: true,
      noiseSuppression: true,
      autoGainControl: true,
    ),

This appears to have no effect, those are set to true by default anyways.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants