How akskriitk/100x_aakash_voice_bot works
Aakash AI is a web voice-and-text assistant that responds in Aakash Kumar’s first person. The main workflow runs from the React voice or text interface through FastAPI to conversation processing, where history and persona grounding inform an answer; voice input can be transcribed before this step. Answers return to the client for display and speech playback. The README documents provider alternatives and health and conversation APIs. Some route and service implementations were not sampled, so those connections reflect documented architecture rather than inspected calls.
Main entry points: useVoiceBot.ts Voice bot state · api.ts API client · router.py API router · agent_workflow.py Persona workflow
Components 26
Web client
- React app
frontend/src/App.tsx - Voice bot UI
frontend/src/components/VoiceBot.tsx - Voice bot state
frontend/src/hooks/useVoiceBot.ts - Audio recorder
frontend/src/hooks/useAudioRecorder.ts - Speech playback
frontend/src/hooks/useSpeechSynthesis.ts - API client
frontend/src/services/api.ts - Local answers
frontend/src/utils/localPersonalityFallback.ts
Backend API
- FastAPI app
backend/app/main.py - API router
backend/app/api/router.py - Chat routes
backend/app/api/v1/chat.py - Voice routes
backend/app/api/v1/voice.py - TTS routes
backend/app/api/v1/tts.py - Health routes
backend/app/api/v1/health.py
Conversation flow
- Conversation service
backend/app/services/conversation_service.py - Voice service
backend/app/services/voice_service.py - Speech transcription
backend/app/services/speech_to_text_service.py
Persona and AI
- Persona workflow
backend/app/services/agent_workflow.py - Semantic retrieval
backend/app/services/semantic_rag.py - Persona knowledge
backend/app/personality - LLM service
backend/app/services/llm_service.py
Storage and providers
- LLM providers
backend/app/providers/llm - Conversation repository
backend/app/repositories/conversation_repository.py - SQL database
backend/app/db/database.py - Speech providers
backend/app/providers/speech - TTS providers
backend/app/providers/tts
Other components
- User
Connections 29
- User → React app: uses
- React app → Voice bot UI: renders
- Voice bot UI → Voice bot state: uses
- Voice bot state → Audio recorder: records
- Voice bot state → Speech playback: speaks answers
- Voice bot state → API client: requests
- Voice bot state → Local answers: falls back
- API client → Chat routes: sends text
- API client → Voice routes: sends audio
- API client → TTS routes: requests audio
- API client → Health routes: checks health
- FastAPI app → API router: mounts routes
- API router → Chat routes: dispatches
- API router → Voice routes: dispatches
- API router → TTS routes: dispatches
- API router → Health routes: dispatches
- Chat routes → Conversation service: processes chat
- Voice routes → Voice service: processes voice
- Voice service → Speech transcription: transcribes audio
- Voice service → Conversation service: dispatches transcript
- Conversation service → Conversation repository: reads and saves
- Conversation service → Persona workflow: runs workflow
- Persona workflow → Semantic retrieval: retrieves context
- Persona workflow → Persona knowledge: uses grounding
- Persona workflow → LLM service: generates answer
- LLM service → LLM providers: calls provider
- Speech transcription → Speech providers: calls provider
- TTS routes → TTS providers: generates speech
- Conversation repository → SQL database: reads and writes