π Get your AssemblyAI API key - Access to Universal-Streaming + $50 credits
Build an ultra-low latency AI voice agent using AssemblyAI's new Universal-Streaming API, OpenAI GPT-4, and ElevenLabs voice synthesis.
- Python 3.8+
- API keys: AssemblyAI, OpenAI, ElevenLabs
- Clone & Install
git clone [email protected]:gsharp-aai/voice-agent-aai-elevenlabs-openai.git
cd voice-agent-aai-elevenlabs-openai
pip install assemblyai openai elevenlabs python-dotenv
- Add API Keys
self.assemblyai_api_key = "ASSEMBLYAI_API_KEY" # Replace with your actual AssemblyAI API key
self.openai_client = OpenAI(api_key="OPEN_AI_API_KEY") # Replace with your actual OpenAI API key
self.elevenlabs_api_key = "ELEVEN_LABS_API_KEY" # Replace with your actual ElevenLabs API key
- Toggle Debug Logging
Most logging is turned off for this tutorial to show a clean transcript output.
If you'd like to see errors, session data, and other information in console, simply change the
DEBUG_MODE
variable.
DEBUG_MODE = False # Set to True to see all logs and debug messages
- Run
python main.py
π Resources