A real-time multilingual AI voice assistant built using:
- Gemini 2.5 Flash
- Sarvam AI STT + TTS
- LiveKit Realtime Streaming
- Python
- Voice Activity Detection (VAD)
Supports:
- English
- Hindi
- Kannada
The assistant can:
- listen through microphone
- detect language automatically
- generate AI responses
- respond back with voice
- maintain conversation context
- support realtime LiveKit streaming
- Voice input through microphone
- AI-generated responses
- Voice output playback
Supports:
- English
- Hindi
- Kannada
Automatic language detection included.
Pipeline:
Microphone
↓
Sarvam Speech-to-Text
↓
Language Detection
↓
Gemini 2.5 Flash
↓
Conversation Memory
↓
Sarvam Text-to-Speech
↓
Speaker Output
Includes:
- LiveKit Agent
- Realtime audio rooms
- Streaming-ready architecture
- Voice Activity Detection (VAD)
- Modular structure
- Logging support
- Error handling
- Retry handling
- Scope restriction
- Conversation memory
multilingual-voicebot/
│
├── app/
│ ├── __init__.py
│ ├── main.py
│ ├── voice_agent.py
│ ├── livekit_agent.py
│ ├── llm_processor.py
│ ├── language_detector.py
│ ├── stt_engine.py
│ ├── tts_engine.py
│ ├── livekit_manager.py
│ ├── conversation_manager.py
│ ├── logger.py
│ ├── scope_validator.py
│ └── config.py
│
├── logs/
│ └── conversations.log
│
├── venv/
│
├── .env
├── requirements.txt
└── README.md
git clone https://github.com/Abhay-0103/multilingual-voicebot.git
cd multilingual-voicebotpython -m venv venvActivate:
venv\Scripts\activatesource venv/bin/activatepip install -r requirements.txtgoogle-genai
python-dotenv
langdetect
requests
sounddevice
numpy
scipy
livekit
livekit-agents
livekit-plugins-sileroCreate:
# Gemini
GEMINI_API_KEY=your_gemini_api_key
# Sarvam AI
SARVAM_API_KEY=your_sarvam_api_key
# LiveKit
LIVEKIT_URL=wss://your-project.livekit.cloud
LIVEKIT_API_KEY=your_livekit_api_key
LIVEKIT_API_SECRET=your_livekit_api_secret
DEEPGRAM_API_KEY=your_deepgram_api_keyGet API Key:
https://aistudio.google.com/app/apikey
Get API Key:
Used for:
- Speech-to-Text
- Text-to-Speech
Get API Key:
Used for:
- Streaming Text-to-Speech
Create Free Account:
Used for:
- realtime streaming
- voice rooms
- audio transport
Run:
python -m app.mainRun:
python -m app.livekit_agent devTell me about AI automation
AI automation क्या है
AI automation ಬಗ್ಗೆ ಹೇಳಿ
The assistant intentionally DOES NOT:
- discuss pricing
- negotiate deals
- provide legal advice
- discuss contracts
This simulates enterprise-safe AI assistants.
All conversations are stored in:
logs/conversations.log
Includes:
- timestamps
- language
- user input
- AI response
- Voice Input
- Voice Output
- Language Detection
- Conversation Memory
- Real-Time STT/TTS
- interruption handling
- streaming TTS
- lower latency
- silence detection
- frontend UI
- realtime streaming pipelines
| Technology | Purpose |
|---|---|
| Gemini 2.5 Flash | AI Responses |
| Sarvam AI | STT + TTS |
| LiveKit | Realtime Streaming |
| Python | Backend |
| Silero VAD | Voice Activity Detection |
- Web dashboard
- Analytics
- AI sales assistant
- CRM integrations
- WhatsApp integration
- Voice cloning
- Streaming LLM responses
This project demonstrates:
- Realtime AI Voice Interaction
- Multilingual Conversations
- AI Automation Workflows
- Production-Style Voice Architecture
- Live Streaming Infrastructure