How hasanpp/aivoiceboat works
AI Voice Bot is a Django voice assistant: users record or submit text in a browser, the WebSocket consumer handles the interaction, and the response is returned as text and audio. Audio input is transcribed through AssemblyAI, responses are generated with Groq, and speech output currently uses gTTS; conversation messages are persisted in SQLite. The README also documents ElevenLabs as a TTS option, but the sampled consumer does not invoke it. UI behavior and some subsystem wiring are documented rather than fully shown in source.
Main entry points: consumers.py Voice consumer · index.html Voice chat page · views.py Page view · urls.py HTTP routes
Components 17
User interface
- Voice chat page
voice_bot/templates/voice_bot/index.html - Page view
voice_bot/views.py - HTTP routes
voice_bot/urls.py
Realtime handling
- ASGI router
AiVoiceBot/asgi.py - WebSocket route
voice_bot/routing.py - Voice consumer
voice_bot/consumers.py - App settings
AiVoiceBot/settings.py
Conversation services
- Speech transcription
voice_bot/consumers.py - AI response
voice_bot/consumers.py - Speech output
voice_bot/consumers.py
Conversation state
- Conversation models
voice_bot/models.py - SQLite database
db.sqlite3
Other components
- Browser user
- AssemblyAI
- Groq AI
- gTTS
- ElevenLabs TTS
Connections 17
- Browser user → Voice chat page: uses
Readme.md - Voice chat page → HTTP routes: requests page
Readme.md - HTTP routes → Page view: routes to
voice_bot/urls.py - Page view → Voice chat page: renders
voice_bot/views.py - Voice chat page → ASGI router: opens WebSocket
Readme.md - ASGI router → WebSocket route: dispatches to
AiVoiceBot/asgi.py - WebSocket route → Voice consumer: routes to
voice_bot/routing.py - Voice consumer → Speech transcription: transcribes audio
voice_bot/consumers.py - Speech transcription → AssemblyAI: uploads and polls
voice_bot/consumers.py - Voice consumer → AI response: requests response
voice_bot/consumers.py - AI response → Groq AI: generates reply
voice_bot/consumers.py - Voice consumer → Speech output: converts reply
voice_bot/consumers.py - Speech output → gTTS: generates audio
voice_bot/consumers.py - Speech output → ElevenLabs TTS: optional TTS
Readme.md - Voice consumer → Conversation models: reads and writes
voice_bot/consumers.py - Conversation models → SQLite database: persists records
- App settings → SQLite database: configures database
AiVoiceBot/settings.py