This project is a prototype for an AI-powered voice agent designed to handle incoming calls for a medical practice. It focuses on demonstrating the voice interaction workflow for appointment scheduling and management using advanced AI technologies.
- Real-time voice conversations using ElevenLabs' conversational AI
- Natural language understanding and response generation
- Seamless voice-to-text and text-to-voice conversion
- ElevenLabs: Voice generation and conversational AI
- Twilio: Call handling and SMS functionality
- OpenAI: Natural language processing and understanding
- FastAPI: Modern, fast web framework
- WebSocket: Real-time audio streaming
- Pydantic: Data validation
- Langchain: AI/LLM integration framework
-
Clone the repository:
git clone https://github.com/pokemon918/Humana-Medical-Voice-Agent cd Humana-Medical-Voice-Agent
-
Create a virtual environment:
python -m virtualenv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install Dependencies:
pip install -r requirements.txt
-
Update the env file with your own credentials and keys based on .env.example file.
-
Run the Application:
python manage.py
-
Start ngrok tunnel:
┌──────────────────────────────────────────────────┐ │ 1. Install ngrok from https://ngrok.com │ │ 2. Open terminal and run: │ │ $ ngrok http 5000 │ │ │ │ 📋 Copy the Forwarding URL: │ │ https://[your-ngrok-subdomain].ngrok.app │ │ or │ │ https://[your-ngrok-subdomain].ngrok-free.app│ └──────────────────────────────────────────────────┘
-
Configure Twilio:
┌──────────────────────────────────────────────────┐ │ Update Twilio Webhook URL: │ │ 1. Go to Twilio Console │ │ 2. Find your phone number │ │ 3. Set Webhook URL to your ngrok URL │ └──────────────────────────────────────────────────┘
-
Call your Twilio phone number and test the application.
app/
├── core/
│ ├── config.py # Configuration settings
│ ├── logger.py # Logging setup
├── routers/
│ └── main.py # Main API routes
├── services/
│ ├── twilio_sms.py # SMS functionality
│ └── twilio_audio_interface.py # Audio handling
└── utils/ # Utility functions
- Advanced appointment availability checking
- Multi-language support
- Enhanced security measures
- Comprehensive logging and monitoring
- Additional EHR integrations