How ppspoornesh/agentic_voice_ai works
This is a Telugu voice-first assistant that gathers a user's details, checks government-scheme eligibility, explains matches, and simulates an application. The main runtime loop in agent.py orchestrates speech input/output, parsing, memory, planning, scheme retrieval, eligibility checks, and application. SQLite memory and deterministic rules are implemented in the sampled sources. The README also describes an LLM explanation capability; its use by the runtime is not shown in the sampled imports, so that integration is marked optional. The schemes data file is present in the tree but was not sampled.
Main entry points: agent.py Conversation agent · voice_io.py Speech input and output · memory.py Conversation memory · tools.py Scheme retrieval
Components 17
Voice Conversation
- Conversation agent
agent.py - Speech input and output
voice_io.py
Agent Reasoning
- Next-action planner
planner.py - Conversation memory
memory.py - SQLite memory
memory.py - Telugu number parsing
telugu_numbers.py - Gender and house parsing
parsers.py
Scheme Services
- Scheme retrieval
tools.py - Scheme definitions
schemes.json - Rule-based eligibility
tools.py - Mock application
tools.py
External Services
- LLM explanations
llm_wrapper.py - Google speech recognition
- Google text-to-speech
- Offline speech fallback
- Groq LLM service
Other components
- Telugu-speaking user
Connections 18
- Telugu-speaking user → Speech input and output: speaks
voice_io.py - Speech input and output → Google speech recognition: recognizes speech
voice_io.py - Conversation agent → Speech input and output: captures and speaks
agent.py - Conversation agent → Next-action planner: requests next action
agent.py - Conversation agent → Conversation memory: reads and saves
agent.py - Conversation memory → SQLite memory: reads and writes
memory.py - Conversation agent → Telugu number parsing: parses numeric replies
agent.py - Conversation agent → Gender and house parsing: parses categorical replies
agent.py - Conversation agent → Scheme retrieval: retrieves schemes
agent.py - Scheme retrieval → Scheme definitions: loads definitions
tools.py - Conversation agent → Rule-based eligibility: checks eligibility
agent.py - Rule-based eligibility → Conversation agent: returns explanation
agent.py - Conversation agent → Mock application: starts mock application
agent.py - Conversation agent → LLM explanations: requests explanations
Readme.md - LLM explanations → Groq LLM service: calls model
llm_wrapper.py - Speech input and output → Google text-to-speech: tries online speech
voice_io.py - Speech input and output → Offline speech fallback: falls back offline
voice_io.py - Speech input and output → Telugu-speaking user: plays speech
voice_io.py