In this quickstart, we'll create a simple conversational bot that greets users when they join and exits when they leave. This example demonstrates the core components of a Pipecat application with a streamlined setup.
Set up your project
Create a project directory
mkdir pipecat-quickstart && cd pipecat-quickstartSet up a virtual environment
Download the example files
Install dependencies
pip install fastapi uvicorn python-dotenv pipecat-ai[webrtc,deepgram,lmnt] pipecat-ai-small-webrtc-prebuiltConfigure the environment
Create a .env file with your LMNT API key:
Replace your_{service}_api_key with the actual API keys you created during the
installation
step.
Run the example
Start the bot with this command:
python 07k-interruptible-lmnt.pyYou'll see a URL (typically http://localhost:7860) in the console output. Open this URL in your browser to join the session. Try having a conversation with the bot!
Understanding the code
Let's examine the key lmnt component of 07k-interruptible-lmnt:
# Initialize LMNT's text-to-speech service
# Using a pre-selected British female voice
# You can find other voices at https://app.lmnt.com/voice-library
tts = LMNTTTSService(
api_key=os.getenv("LMNT_API_KEY"),
voice_id="morgan", # British Lady
)Customize the example
Try these simple modifications to enhance your bot:
Next steps
Now that you have seen how to get a simple bot running, proceed to the Pipecat Cloud quickstart to see an example deployment.