TwilioCallBot is a voice-driven automated calling system that utilizes Twilio for telephony services and ElevenLabs for text-to-speech capabilities. This application allows you to program and deploy automated voice calls with natural-sounding speech.
- Python 3.8+ (development was done using Python 3.8.3)
- All dependencies listed in
requirements.txt
- Twilio Account - For making and receiving phone calls
- ElevenLabs Account - For high-quality text-to-speech conversion
- ngrok - For exposing your local server to the internet
git clone <repository-url>
cd TwilioCallBot
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
ngrok is a tunneling service that makes your local server accessible to the internet, allowing Twilio to communicate with your application.
- Download ngrok from https://ngrok.com/
- Follow ngrok's installation instructions for your operating system
- After installing, authenticate ngrok:
ngrok authtoken <your-ngrok-auth-token>
- Sign up for a Twilio account at https://www.twilio.com/
- Once registered, navigate to your Dashboard to find your Account SID and Auth Token
- Create a Twilio phone number(One free number with trail account) through the Twilio console
- Create an account at https://elevenlabs.io/
- Get your API key from https://elevenlabs.io/app/settings/api-keys
- Open the
config.jsonfile and update it with your credentials:{ "account_sid": "", "auth_token": "", "phone_number": "", "elevenlabs_api_key": "", "webhook_url": "", "voice_id": "", "voice_name": "" }
- Start your application: The application automatically:
- Starts the Flask server
- Launches and manages ngrok
- Updates the config.json file witha the current ngrok URL
- Updates your Twilio webhook configuration
Your TwilioCallBot is now ready to receive and make calls!
- Keep your API keys and tokens secure and never commit them to version control
- Your local server must be running for the CallBot to function
- Check Twilio logs in the console if calls aren't connecting properly
- Verify your ElevenLabs API key has sufficient credits
- Ensure your
config.jsonfile has the correct credentials - Check that your Flask app is running without errors