An AI-powered voice concierge system built with Twilio, ElevenLabs, and AssemblyAI. The system answers calls, processes voice input, and connects callers with residents or handles delivery personnel.
- Node.js (v18 or higher)
- npm
- ngrok account
- Twilio account and phone number
- ElevenLabs account and API key
- AssemblyAI account and API key
- Clone the repository:
- Install dependencies:
npm install
- Install ngrok globally:
npm install -g ngrok
- Create a
.env
file in the root directory with your credentials:
TWILIO_ACCOUNT_SID=your_account_sid_here
TWILIO_AUTH_TOKEN=your_auth_token_here
ASSEMBLYAI_API_KEY=your_assemblyai_api_key_here
ELEVENLABS_API_KEY=your_elevenlabs_api_key_here
ELEVENLABS_VOICE_ID=your_voice_id_here
PORT=3000
- Start the server:
npm start
- In a new terminal, start ngrok:
ngrok http 3000
- Copy the HTTPS URL provided by ngrok (e.g.,
https://your-ngrok-url.ngrok-free.app
)
- Go to your Twilio Console
- Select your phone number
- Under "Voice & Fax", find "A Call Comes In"
- Set the webhook URL to your ngrok URL +
/twilio/incoming
:- Example:
https://your-ngrok-url.ngrok-free.app/twilio/incoming
- Example:
- Set the HTTP method to POST
To test - call the twilio number we have configured.
The system will now:
- Answer incoming calls with an AI voice prompt
- Record the caller's response
- Process the audio to identify the requested resident
- Either connect the call to the resident or handle delivery personnel
- Keep your
.env
file secure and never commit it to version control - The ngrok URL changes each time you restart ngrok
- Update the Twilio webhook URL whenever the ngrok URL changes
- For production, use a stable domain instead of ngrok
MIT