How tekessence/ar-hosted-calling works
AR Voice Agent is a self-hosted insurance-claims voice agent with an admin UI. Its main workflow is a Twilio call entering the FastAPI telephony route, running through a per-call conversation, and returning synthesized speech; operators also manage accounts and review calls through the dashboard. The README documents GPU Whisper/vLLM, Redis, telephony, exports and live monitoring. The graph includes those documented capabilities, but omits uncertain UI-to-API links because sampled frontend files do not show them.
Main entry points: app.py FastAPI app · state.py Model and app state · telephony.py Telephony routes · tts.py TTS orchestration
Components 26
Voice runtime
- Telephony routes
server/routes/telephony.py - Call session
call_session.py - Browser voice test
server/routes/browser_ws.py
Backend API
- FastAPI app
server/app.py - Projects and accounts
server/routes/accounts.py - Chat routes
server/routes/chat.py - Dashboard routes
server/routes/dashboard.py
Admin experience
- Dashboard UI
frontend/app/(main)/page.tsx - Project management UI
frontend/app/(main)/projects/page.tsx - Call detail UI
frontend/components/call-detail.tsx - Review UI
frontend/app/(main)/review/page.tsx - Settings UI
frontend/app/(main)/settings/page.tsx - Frontend API client
frontend/lib/api.ts
Speech and language
- Audio and VAD
audio.py - Claim prompts
prompts.py - TTS orchestration
server/tts.py - TTS text processing
server/tts_plain.py - Speech text transforms
tts_common.py
State and integrations
- Model and app state
server/state.py - Redis
- Faster-Whisper
- vLLM LLM
- Chatterbox service
chatterbox_service/app.py
Other components
- Insurance caller
- Twilio Media Streams
- Admin operator
Connections 27
- Insurance caller → Twilio Media Streams: calls via PSTN
- Twilio Media Streams → Telephony routes: streams audio
- FastAPI app → Telephony routes: registers routes
server/app.py - FastAPI app → Browser voice test: registers routes
server/app.py - Telephony routes → Call session: creates session
server/routes/telephony.py - Call session → Audio and VAD: uses codec
call_session.py - Call session → Claim prompts: uses prompts
call_session.py - Telephony routes → TTS orchestration: uses speech output
server/routes/telephony.py - Browser voice test → Audio and VAD: transcribes audio
server/routes/browser_ws.py - Browser voice test → TTS orchestration: streams reply audio
server/routes/browser_ws.py - TTS orchestration → TTS text processing: delegates plain mode
server/tts.py - TTS text processing → Speech text transforms: uses transforms
server/tts_plain.py - TTS orchestration → Chatterbox service: requests synthesis
server/tts.py - FastAPI app → Model and app state: loads models
server/app.py - Model and app state → Redis: connects
server/state.py - Model and app state → Faster-Whisper: loads model
server/state.py - Model and app state → vLLM LLM: configures client
server/state.py - Projects and accounts → Redis: stores account data
server/routes/accounts.py - FastAPI app → Projects and accounts: registers routes
server/app.py - FastAPI app → Chat routes: registers routes
server/app.py - FastAPI app → Dashboard routes: registers routes
server/app.py - Dashboard UI → Admin operator: presents dashboard
- Admin operator → Project management UI: manages projects
- Admin operator → Call detail UI: reviews calls
- Admin operator → Review UI: reviews outcomes
- Admin operator → Settings UI: configures service
- Frontend API client → Dashboard UI: supports API access