Files
pipecat/examples/twilio-chatbot/client/python
Aleix Conchillo Flaqué b118082984 AudioBufferProcessor: treat all streams as intermittent
This fixes an issue with STTMuteFilter that prevents user audio to be pushed
downstream.
2025-06-18 18:23:31 -07:00
..

Python Client for Server Testing

This Python client enables automated testing of the server via WebSocket without the need to make actual phone calls.

Setup Instructions

1. Configure the Stream Template

Edit the templates/streams.xml file to point to your servers WebSocket endpoint. For example:

<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Connect>
    <Stream url="ws://localhost:8765/ws" />
  </Connect>
  <Pause length="40"/>
</Response>

2. Start the Server in Test Mode

Run the server with the -t flag to indicate test mode:

# Ensure you're in the project directory and your virtual environment is activated
python server.py -t

3. Run the Client

Start the client and point it to the server URL:

python client.py -u http://localhost:8765 -c 2
  • -u: Server URL (default is http://localhost:8765)
  • -c: Number of concurrent client connections (e.g., 2)