A fun application that uses ElevenLabs AI voice technology integrated with Twilio to trigger and automate conversational prank calls.
This app leverages the power of:
- ElevenLabs Conversational Agent: An AI-driven voice chatbot capable of natural conversation
- Twilio Voice API: Telephony infrastructure to place and manage calls
Using this integration, you can trigger automated calls where an AI agent conducts realistic conversations with the call recipient.
- Python 3.7+
- ElevenLabs account with:
- API key
- Conversational Agent ID
- Agent Phone Number ID (from ElevenLabs workspace)
- Twilio account with:
- Account SID
- Auth Token
- Twilio phone number
- Clone this repository
- Install dependencies:
pip install -r requirements.txt - Create a
.envfile in the project root with the following variables:
# ElevenLabs API credentials
ELEVENLABS_API_KEY=your_elevenlabs_api_key
ELEVENLABS_AGENT_ID=agent_01jvapqns3fpdtsz9vtyyvx458
ELEVENLABS_AGENT_PHONE_NUMBER_ID=your_agent_phone_number_id
# Twilio API credentials
TWILIO_ACCOUNT_SID=your_twilio_account_sid
TWILIO_AUTH_TOKEN=your_twilio_auth_token
TWILIO_PHONE_NUMBER=your_twilio_phone_number
# Target phone number
TARGET_PHONE_NUMBER=+1234567890
- The application uses the ElevenLabs API to trigger an outbound call through Twilio's infrastructure
- When the call is answered, the ElevenLabs Conversational Agent takes over
- The AI agent conducts a realistic conversation in real-time using advanced voice synthesis and natural language processing
- The conversation flow is handled entirely by the ElevenLabs Agent, which can understand responses and adapt accordingly
To trigger a call:
python launch_call.pyIf successful, you'll see Success ✔️ Call initiated. along with the Twilio Call SID.
- Create a Conversational Agent in the ElevenLabs platform
- In your ElevenLabs workspace, set up Twilio integration:
- Add your Twilio phone number
- Set the Twilio webhook to
https://api.<region>.elevenlabs.io/twilio/inbound_call - Create a workspace secret with your Twilio Auth Token
- Copy the generated phone number ID to your
.envfile
- This is meant for entertainment purposes only. Use responsibly and ethically.
- Always comply with local laws regarding automated calls and recordings.
- The person being called should be aware this is for entertainment.
- Never use this for harassment, scams, or any malicious purposes.
Be aware of legal requirements in your jurisdiction regarding:
- Automated calling systems
- Call recording and consent
- Impersonation laws
- Spam and robocall regulations