- Transcribe live customer audio in real-time
- Generate contextual responses using AI
- Convert responses to natural-sounding speech
- Maintain fluid conversations with built-in voice activity detection
Get Started with Plivo
Before developing your AI voice agent, Sign up for Plivo or sign in to your existing account. Purchase a number through the Voice API or Plivo console to receive customer calls.Prerequisites
You’ll need active accounts and API keys from:- Deepgram for speech-to-text conversion
- OpenAI for conversational AI
- ElevenLabs for text-to-speech synthesis
Clone the Plivo audio stream integration guides repository
Setting Up Your Development Environment
First, create a Python virtual environment and install the required dependencies:Install requirements
- Install Python Requirements
- Install FFmpeg for audio processing by downloading it from the official website.
Configure Your Environment
Create aconfig.json
file with your API credentials:
Customize Your Voice Agent’s Personality
Define your voice agent’s behavior by updating the LLM prompt. You can update the LLM prompt by updating your system message inserver.py
:
Set Up Local Development Environment
To test your application locally:- Install ngrok:
- Start an ngrok tunnel to expose your local server:
- Launch your application:
Configure Your Plivo Number
Set up your Plivo number to handle incoming calls using the command:Testing Your Voice Agent
Once configured, your voice agent is ready to handle calls. Place a test call to your Plivo number to interact with your AI-powered voice agent. The agent will:- Listen for incoming audio using voice activity detection
- Transcribe speech when a pause is detected
- Generate an AI response based on the transcription
- Convert the response to natural speech
- Play the response back to the caller
- Visit Plivo Documentation.
- Contact Plivo Support for technical assistance.