Set Up
Set up your development environment for Speaking Bots
Installation
0. Clone Repository
If you haven't already, clone the repository and navigate to it:
1. Prerequisites
- Python 3.11+
grpc_tools
for protocol buffer compilation- Ngrok for local development (follow our Ngrok Setup Guide)
- Poetry for dependency management
You'll also need system dependencies for scientific libraries:
2. Set Up Poetry Environment
3. Compile Protocol Buffers
Protocol Buffers are used here by Pipecat to define a structured message format for real-time communication between components of the Speaking Bots system. Specifically, the frames.proto
file defines three main message types:
TextFrame
: For handling text-based messagesAudioRawFrame
: For managing raw audio data with properties like sample rate and channelsTranscriptionFrame
: For handling speech-to-text transcription results
Protocol Buffers is the backbone of consistent data serialization across services. Read more in the official Protocol Buffer documentation and this Python Protocol Buffers tutorial.
4. Configure Environment
Create a .env
file based on the template:
Edit the .env
file with your API keys. You'll need:
Required API Keys:
MEETING_BAAS_API_KEY
: For meeting platform integrationOPENAI_API_KEY
: For the conversation LLMCARTESIA_API_KEY
: For text-to-speechGLADIA_API_KEY
orDEEPGRAM_API_KEY
: For speech-to-text
For production, also set:
See our full Environment Variables Guide for more details.
5. Run the API Server
The project now follows an API-first approach. There are two ways to run the server:
Once the server is running, you can access:
- Interactive API docs:
http://localhost:8766/docs
- OpenAPI specification:
http://localhost:8766/openapi.json
To create a bot via the API:
You can also use our CLI tools for testing:
Follow our Command Line Guide for more examples and options.