How dummycodertech/voicekam works
Riya is a voice-first seller-retention assistant: a seller starts an inbound, proactive, or follow-up consultation in the browser; the service manages a phased session, grounds its conversation in deterministic seller diagnosis, captures commitments and a follow-up, and presents a recap. Supporting layers provide LLM streaming with provider failover and speech output. The README documents these capabilities; some frontend and backend wiring is unsampled, so those links are cited to the README rather than inferred from co-location.
Main entry points: main.py FastAPI Service · orchestrator.py Turn Orchestrator · router.py LLM Failover Router · app.js Call Interface
Components 25
Voice Experience
- Call Interface
frontend/app.js - Audio Playback
frontend/audio.js - KAM Brain Panel
frontend/kam_brain.js - Audio Visualizer
frontend/viz.js
KAM Consultation
- FastAPI Service
app/main.py - Runtime Settings
app/config.py - Session State
app/agent/session.py - Call State Machine
app/agent/state_machine.py - Turn Orchestrator
app/agent/orchestrator.py - Speakable Text
app/agent/speakable.py
Grounded Intelligence
- KAM Tool Dispatcher
app/engine/tools.py - Seller Diagnosis
app/engine/diagnosis.py - Seller Fixtures
app/data/seed_data.py
AI Providers & Speech
- LLM Failover Router
app/llm/router.py - Provider Interface
app/llm/base.py - OpenAI-Compatible Client
app/llm/openai_compat.py - Groq Adapter
app/llm/groq_provider.py - Gemini Adapter
app/llm/gemini_provider.py - OpenRouter Adapter
app/llm/openrouter_provider.py - Mock LLM
app/llm/mock_provider.py - Speech Synthesis
app/tts/service.py
Other components
- Seller
- Browser
- LLM Services
- Speech Services
Connections 34
- Seller → Call Interface: uses
README.md - Call Interface → FastAPI Service: calls API
README.md - FastAPI Service → Browser: serves UI
README.md - Call Interface → Audio Playback: queues audio
README.md - Audio Playback → Browser: plays speech
README.md - Call Interface → KAM Brain Panel: updates panel
README.md - Audio Playback → Audio Visualizer: feeds audio
README.md - FastAPI Service → Runtime Settings: loads
app/main.py - FastAPI Service → Session State: creates and reads
app/main.py - FastAPI Service → Turn Orchestrator: streams turns
app/main.py - FastAPI Service → Speech Synthesis: synthesizes speech
README.md - Turn Orchestrator → Session State: updates
app/agent/orchestrator.py - Turn Orchestrator → Call State Machine: checks phase
app/agent/orchestrator.py - Turn Orchestrator → KAM Tool Dispatcher: executes tools
app/agent/orchestrator.py - Turn Orchestrator → LLM Failover Router: streams completion
app/agent/orchestrator.py - Turn Orchestrator → Speakable Text: formats speech
app/agent/orchestrator.py - KAM Tool Dispatcher → Seller Diagnosis: dispatches analysis
app/engine/tools.py - Seller Diagnosis → Seller Fixtures: reads data
app/engine/diagnosis.py - KAM Tool Dispatcher → Session State: records commitments
app/engine/tools.py - Session State → Seller Fixtures: loads follow-up defaults
app/agent/session.py - LLM Failover Router → Runtime Settings: configures providers
app/llm/router.py - LLM Failover Router → Groq Adapter: selects provider
app/llm/router.py - LLM Failover Router → Gemini Adapter: selects provider
app/llm/router.py - LLM Failover Router → OpenRouter Adapter: selects provider
app/llm/router.py - LLM Failover Router → Mock LLM: selects provider
app/llm/router.py - Groq Adapter → Provider Interface: implements
app/llm/groq_provider.py - Gemini Adapter → Provider Interface: implements
app/llm/gemini_provider.py - Mock LLM → Provider Interface: implements
app/llm/mock_provider.py - Groq Adapter → OpenAI-Compatible Client: uses client
app/llm/groq_provider.py - OpenRouter Adapter → OpenAI-Compatible Client: uses client
app/llm/openrouter_provider.py - OpenAI-Compatible Client → LLM Services: calls API
README.md - Gemini Adapter → LLM Services: calls API
README.md - Speech Synthesis → Speech Services: tries speech providers
README.md - Speech Synthesis → Browser: signals browser fallback
README.md