Files
pipecat/examples
Sam Sykes 7596d71460 Speechmatics STT + multi-speaker conversations (#2036)
* initial config

* skeleton

* Added a README (to be added to).

* Payloads coming from the ASR.

* doc update

* handle the partials and finals

* enable diarization in the example

* support sending messages to pipecat pipeline

* requirements fix in README

* updated example (with amusement)

* updated example to match master

* updated docs

* support for diarization tags

* logic fix for wrapper

* Use an internal SpeechFrame for speaker_id (not user_id).

* only include speaker tags on finalised transcript (as this may skew end of utterance detection)

* updated docs

* correction to docs and updated example

* updated requirement

* Fix for using default EU server.

* Updates from PR comments.

* Refactor based on comments in the original PR.

Primary focus on documentation, naming conventions and how `user_id` is used.

* Check for SMX installed when importing.

* Variable name change

* Comment correction.

* Support for Esporanto and Uyghur

* Impoved language support

* function name change

* Locale fix

* intercept

* interim changes

* pass the pipeline task to the module for adding events to the top of the pipeline

* logging for the pipeline

* Reduce timeout for content aggregator.

* staged update

* testing with Azure

* Updated context (Azure was dropping punctuation) and using better ElevenLabs model.

* Updated to RT 0.3.0 and use OpenAI (not Azure).

* Missing OpenAI import; parameter name change for output locale validation.

* Revert to `0.2.0` of RT SDK.

* fix for assignment of `output_locale_code`.

* update Speechmatics library to 0.3.1

* new transcription example

* updated asyncio task handling

* Updated doc strings

* enable OpenTelemetry logging

* removed import from stt for __init__

* updated examples and default values

* updated examples

* prevent lock up when closing the STT connection
2025-07-03 17:25:13 -03:00
..
2025-07-02 16:33:24 -07:00
2025-07-02 20:57:38 +02:00

Pipecat — Examples

Foundational snippets

Small snippets that build on each other, introducing one or two concepts at a time.

➡️ Take a look

Chatbot examples

Collection of self-contained real-time voice and video AI demo applications built with Pipecat.

Quickstart

Each project has its own set of dependencies and configuration variables. They intentionally avoids shared code across projects — you can grab whichever demo folder you want to work with as a starting point.

We recommend you start with a virtual environment:

cd pipecat-ai/examples/simple-chatbot

python -m venv venv

source venv/bin/activate

pip install -r requirements.txt

Next, follow the steps in the README for each demo.

Make sure you pip install -r requirements.txt for each demo project, so you can be sure to have the necessary service dependencies that extend the functionality of Pipecat. You can read more about the framework architecture here.

Projects:

Project Description Services
Simple Chatbot Basic voice-driven conversational bot. A good starting point for learning the flow of the framework. Deepgram, ElevenLabs, OpenAI, Daily, Daily Prebuilt UI
Storytelling Chatbot Stitches together multiple third-party services to create a collaborative storytime experience. Deepgram, ElevenLabs, OpenAI, Fal, Daily, Custom UI
Translation Chatbot Listens for user speech, then translates that speech to Spanish and speaks the translation back. Demonstrates multi-participant use-cases. Deepgram, Azure, OpenAI, Daily, Daily Prebuilt UI
Moondream Chatbot Demonstrates how to add vision capabilities to GPT4. Note: works best with a GPU Deepgram, ElevenLabs, OpenAI, Moondream, Daily, Daily Prebuilt UI
Patient intake A chatbot that can call functions in response to user input. Deepgram, ElevenLabs, OpenAI, Daily, Daily Prebuilt UI
Phone Chatbot A chatbot that connects to PSTN/SIP phone calls, powered by Daily or Twilio. Deepgram, ElevenLabs, OpenAI, Daily, Twilio
Twilio Chatbot A chatbot that connects to an incoming phone call from Twilio. Deepgram, ElevenLabs, OpenAI, Daily, Twilio
studypal A chatbot to have a conversation about any article on the web
WebSocket Chatbot Server A real-time websocket server that handles audio streaming and bot interactions with speech-to-text and text-to-speech capabilities. Cartesia, Deepgram, OpenAI, Websockets

Important

These example projects use Daily as a WebRTC transport and can be joined using their hosted Prebuilt UI. It provides a quick way to join a real-time session with your bot and test your ideas without building any frontend code. If you'd like to see an example of a custom UI, try Storybot.

FAQ

Deployment

For each of these demos we've included a Dockerfile. Out of the box, this should provide everything needed to get the respective demo running on a VM:

docker build username/app:tag .

docker run -p 7860:7860 --env-file ./.env username/app:tag

docker push ...

SSL

If you're working with a custom UI (such as with the Storytelling Chatbot), it's important to ensure your deployment platform supports HTTPS, as accessing user devices such as mics and webcams requires SSL.

If you try to run a custom UI without SSL, you may see an error in the console telling you that navigator is undefined, or no devices are available.

Are these examples production ready?

Yes, kind of.

These demos attempt to keep things simple and are unopinionated regarding environment or scalability.

We're using FastAPI to spawn a subprocess for the bots / agents — useful for small tests, but not so great for production grade apps with many concurrent users. You can see how this works in each project's start endpoint in server.py.

Creating virtualized worker pools and on-demand instances is out of scope for these examples, but we hope to add some examples to this repo soon!

For projects that have CUDA as a requirement, such as Moondream Chatbot, be sure to deploy to a GPU-powered platform (such as fly.io or Runpod.)

Getting help

➡️ Join our Discord

➡️ Reach us on Twitter