pipecat icon indicating copy to clipboard operation
pipecat copied to clipboard

Interrupted by itself when speaker on using websockets in Twilio.

Open devedgecio opened this issue 7 months ago • 6 comments

pipecat version

0.0.65

Python version

3.10

Operating System

Ubuntu 22.02

Issue description

When the user calls the bot on speakerphone, the bot's voice may sometimes be taken as input, interrupting the pipeline.

Reproduction steps

N/A

Expected behavior

Bot should ignore its own voice.

Actual behavior

Bot takes the audio as an input and respond accordingly.

Logs


devedgecio avatar May 07 '25 20:05 devedgecio

I don't see this issue in my testing using Twilio + FastAPIWebsocketTransport. This sounds like it may be a handset specific problem. What type of phone are you using?

markbackman avatar May 07 '25 21:05 markbackman

@markbackman , Iphone 16 pro.

devedgecio avatar May 08 '25 11:05 devedgecio

Strange. I don't see this. You can try for yourself. Here's a Twilio + websockets bot that's hosted on Pipecat Cloud:

  • Call +1-929-556-4263
  • It's this demo: https://github.com/pipecat-ai/pipecat/blob/main/examples/word-wrangler-gemini-live/server/bot_phone_twilio.py

markbackman avatar May 08 '25 12:05 markbackman

@markbackman I've encountered this issue as well. It happens occasionally. I have a voice bot application in production, and for some users, the bot malfunctions.

Ahmer967 avatar May 09 '25 19:05 Ahmer967

@markbackman I have been facing a similar issue. It happens randomly. I am using gemini live api with daily transporter

iAmLakshya avatar May 20 '25 16:05 iAmLakshya

Echo cancellation is available by default when connecting via:

  • WebRTC on Chrome/Chromium browsers, and Safari. Firefox does not have echo cancellation built in (which is... suboptimal)
  • Phones, which have built-in echo cancellation. Specifically, this works when connecting via speakerphone to prevent the remote party from hearing themself while you speak on speakerphone.

One possible issue is that background sound or ambient noise is causing the bot to be interrupted—not echo from the bot. You can defend against this using noise and background voice cancellation using something like Krisp.

I'm inclined to close this issue unless someone can surface a repro case that points to a Pipecat issue. I'll leave it open for a little longer to allow time to submit a repro case.

markbackman avatar May 20 '25 18:05 markbackman

I'm having the same issue with IPhone 16 pro max, the own bot is self interrupting

mbturno avatar Jul 03 '25 02:07 mbturno