Introduction
superU lets you build a real-time conversational AI voice assistant for your website or app. It uses your microphone to capture audio, streams it to an AI model, and plays back the AI’s spoken response—all in just a few hundred milliseconds.Quick Overview
Goal: Enable real-time voice conversations with AI. Use Cases:- Customer support over AI calls
- Voice assistant for your website/app
- Cold calling with AI
- Call center automation
- Python
- PyAudio
- WebSockets
- SuperU SDK
Output: AI-generated speech
Prerequisites
Before you start, make sure you have:- Python installed on your computer
- Internet connection
- A microphone and speakers/headphones
- An account on SuperU
Getting Started
1
Sign Up and Get Your API Key
- Go to dev.superu.ai and sign up for an account
- After signing up, visit your dashboard 3. Copy your API key from the dashboard
For security, store your API key in an environment variable instead of
hard-coding it in your code.
Setup & Configuration
1
Install Dependencies
Open your terminal and run the appropriate command for your operating system:
2
Configure Audio
The code will use your system’s default microphone and speakers. No extra setup is needed, but make sure your devices are working properly.
Running the Demo
1
Copy and Run the Code
Create a new Python file (e.g.,
superU_voice_assistant.py) and paste the following code. Replace <YOUR_API_KEY> with your actual API key:2
Run the Application
Execute your Python file using the appropriate command:
You should see “Connected to WebSocket. Streaming audio…” in your terminal, indicating a successful connection.
Customizing Your Assistant
You can personalize your AI assistant by modifying several key components:Change the First Message
TheFirst_message variable defines what the assistant says when the conversation starts.
Modify the System Prompt
TheSystem_prompt variable defines how the assistant should behave and respond.
How It Works
The voice assistant operates through a real-time audio streaming process:- Audio Capture: Your microphone captures your voice
- WebSocket Transmission: Audio is sent to the AI model via WebSocket connection
- AI Processing: The AI listens, processes, and generates a response
- Voice Synthesis: The AI’s response is converted to natural-sounding speech
- Audio Playback: You hear the AI’s response through your speakers—all in real time!
Available Voices
You can choose from many different AI voices by changing thevoice_id parameter. Each voice has a unique ID and supports various languages.
Available Voices
List of all available voice IDs with their description and tested out use
cases.
Additional Resources
Congratulations! You now have a real-time AI voice assistant running on your
machine.

