# vrksolutionsinfo-beep/tata-aia-voise-agent architecture

> Architecture diagram of the GitHub repository vrksolutionsinfo-beep/tata-aia-voise-agent, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/vrksolutionsinfo-beep/tata-aia-voise-agent
- Repository: https://github.com/vrksolutionsinfo-beep/tata-aia-voise-agent

## Overview

Durga is an offline Telugu recruitment voice agent. A candidate uses the desktop text or voice interface, or the optional headless web voice interface; speech is recognized locally, a deterministic dialogue flow handles consent and recruitment questions using the local FAQ, and responses are spoken or displayed. Confirmed candidate details and outcomes are stored in SQLite. The web server adds authenticated session access. Edges reflect shown calls or README descriptions; unsampled implementation details are not inferred.

Main entry points: [`app/dialogue.py`](https://github.com/vrksolutionsinfo-beep/tata-aia-voise-agent/blob/main/app/dialogue.py) (Consent and dialogue state), [`app/audio.py`](https://github.com/vrksolutionsinfo-beep/tata-aia-voise-agent/blob/main/app/audio.py) (Desktop audio session), [`app/web_voice.py`](https://github.com/vrksolutionsinfo-beep/tata-aia-voise-agent/blob/main/app/web_voice.py) (Web voice session), [`app/config.py`](https://github.com/vrksolutionsinfo-beep/tata-aia-voise-agent/blob/main/app/config.py) (Runtime configuration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["Candidate interfaces"]
  node_desktop["Desktop and text UI<br/>[main.py]"]
  node_webclient["Web client<br/>[app.js]"]
  node_server["Authenticated web server<br/>[server.py]"]
  node_webvoice["Web voice session<br/>[web_voice.py]"]
  node_audio["Desktop audio session<br/>[audio.py]"]
  node_transport["PCM transport conversion<br/>[transport.py]"]
end

subgraph group_conversation["Conversation workflow"]
  node_dialogue["Consent and dialogue state<br/>[dialogue.py]"]
  node_knowledge["Recruitment FAQ matching<br/>[knowledge.py]"]
end

subgraph group_speech["Local speech"]
  node_recognizer["Telugu speech recognition<br/>[speech.py]"]
  node_vad["Voice activity detection<br/>[audio.py]"]
  node_synth["Telugu speech synthesis<br/>[speech.py]"]
end

subgraph group_records["Records and configuration"]
  node_repository[("Lead and outcome repository<br/>[storage.py]")]
  node_config["Runtime configuration<br/>[config.py]"]
end

node_candidate(("Candidate"))

node_candidate -->|"uses"| node_desktop
node_candidate -.->|"uses"| node_webclient
node_desktop -->|"starts session"| node_dialogue
node_desktop -->|"starts voice"| node_audio
node_desktop -->|"creates repository"| node_repository
node_audio -->|"detects speech"| node_vad
node_audio -->|"transcribes audio"| node_recognizer
node_audio -->|"submits turns"| node_dialogue
node_audio -->|"renders response"| node_synth
node_dialogue -->|"matches FAQ"| node_knowledge
node_dialogue -.->|"records outcomes"| node_repository
node_server -->|"routes voice"| node_webvoice
node_server -->|"provides repository"| node_repository
node_webvoice -->|"runs session"| node_dialogue
node_webvoice -->|"loads recognizer"| node_recognizer
node_webvoice -->|"loads voice"| node_synth
node_webclient -.->|"connects"| node_server
node_transport -.->|"converts audio"| node_webvoice
node_config -->|"configures"| node_dialogue
node_config -->|"configures"| node_knowledge
node_config -->|"configures"| node_recognizer
node_config -->|"configures"| node_synth

click node_desktop "https://github.com/vrksolutionsinfo-beep/tata-aia-voise-agent/blob/main/app/main.py"
click node_webclient "https://github.com/vrksolutionsinfo-beep/tata-aia-voise-agent/blob/main/web/app.js"
click node_server "https://github.com/vrksolutionsinfo-beep/tata-aia-voise-agent/blob/main/server.py"
click node_webvoice "https://github.com/vrksolutionsinfo-beep/tata-aia-voise-agent/blob/main/app/web_voice.py"
click node_audio "https://github.com/vrksolutionsinfo-beep/tata-aia-voise-agent/blob/main/app/audio.py"
click node_transport "https://github.com/vrksolutionsinfo-beep/tata-aia-voise-agent/blob/main/app/transport.py"
click node_dialogue "https://github.com/vrksolutionsinfo-beep/tata-aia-voise-agent/blob/main/app/dialogue.py"
click node_knowledge "https://github.com/vrksolutionsinfo-beep/tata-aia-voise-agent/blob/main/app/knowledge.py"
click node_recognizer "https://github.com/vrksolutionsinfo-beep/tata-aia-voise-agent/blob/main/app/speech.py"
click node_vad "https://github.com/vrksolutionsinfo-beep/tata-aia-voise-agent/blob/main/app/audio.py"
click node_synth "https://github.com/vrksolutionsinfo-beep/tata-aia-voise-agent/blob/main/app/speech.py"
click node_repository "https://github.com/vrksolutionsinfo-beep/tata-aia-voise-agent/blob/main/app/storage.py"
click node_config "https://github.com/vrksolutionsinfo-beep/tata-aia-voise-agent/blob/main/app/config.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_desktop,node_webclient,node_server,node_webvoice,node_audio,node_transport toneBlue
class node_dialogue,node_knowledge toneAmber
class node_recognizer,node_vad,node_synth toneMint
class node_repository,node_config toneRose
class node_candidate toneIndigo
```

## Components

### Candidate interfaces

- [Desktop and text UI](https://github.com/vrksolutionsinfo-beep/tata-aia-voise-agent/blob/main/app/main.py): `app/main.py`
- [Web client](https://github.com/vrksolutionsinfo-beep/tata-aia-voise-agent/blob/main/web/app.js): `web/app.js`
- [Authenticated web server](https://github.com/vrksolutionsinfo-beep/tata-aia-voise-agent/blob/main/server.py): `server.py`
- [Web voice session](https://github.com/vrksolutionsinfo-beep/tata-aia-voise-agent/blob/main/app/web_voice.py): `app/web_voice.py`
- [Desktop audio session](https://github.com/vrksolutionsinfo-beep/tata-aia-voise-agent/blob/main/app/audio.py): `app/audio.py`
- [PCM transport conversion](https://github.com/vrksolutionsinfo-beep/tata-aia-voise-agent/blob/main/app/transport.py): `app/transport.py`

### Conversation workflow

- [Consent and dialogue state](https://github.com/vrksolutionsinfo-beep/tata-aia-voise-agent/blob/main/app/dialogue.py): `app/dialogue.py`
- [Recruitment FAQ matching](https://github.com/vrksolutionsinfo-beep/tata-aia-voise-agent/blob/main/app/knowledge.py): `app/knowledge.py`

### Local speech

- [Telugu speech recognition](https://github.com/vrksolutionsinfo-beep/tata-aia-voise-agent/blob/main/app/speech.py): `app/speech.py`
- [Voice activity detection](https://github.com/vrksolutionsinfo-beep/tata-aia-voise-agent/blob/main/app/audio.py): `app/audio.py`
- [Telugu speech synthesis](https://github.com/vrksolutionsinfo-beep/tata-aia-voise-agent/blob/main/app/speech.py): `app/speech.py`

### Records and configuration

- [Lead and outcome repository](https://github.com/vrksolutionsinfo-beep/tata-aia-voise-agent/blob/main/app/storage.py): `app/storage.py`
- [Runtime configuration](https://github.com/vrksolutionsinfo-beep/tata-aia-voise-agent/blob/main/app/config.py): `app/config.py`

### Other components

- **Candidate**

## Connections

- Candidate → Desktop and text UI: uses (evidence: `README.md`)
- Candidate → Web client: uses
- Desktop and text UI → Consent and dialogue state: starts session (evidence: `app/main.py`)
- Desktop and text UI → Desktop audio session: starts voice (evidence: `app/main.py`)
- Desktop and text UI → Lead and outcome repository: creates repository (evidence: `app/main.py`)
- Desktop audio session → Voice activity detection: detects speech (evidence: `app/audio.py`)
- Desktop audio session → Telugu speech recognition: transcribes audio (evidence: `app/audio.py`)
- Desktop audio session → Consent and dialogue state: submits turns (evidence: `app/audio.py`)
- Desktop audio session → Telugu speech synthesis: renders response (evidence: `app/audio.py`)
- Consent and dialogue state → Recruitment FAQ matching: matches FAQ (evidence: `app/dialogue.py`)
- Consent and dialogue state → Lead and outcome repository: records outcomes (evidence: `app/storage.py`)
- Authenticated web server → Web voice session: routes voice (evidence: `server.py`)
- Authenticated web server → Lead and outcome repository: provides repository (evidence: `server.py`)
- Web voice session → Consent and dialogue state: runs session (evidence: `app/web_voice.py`)
- Web voice session → Telugu speech recognition: loads recognizer (evidence: `app/web_voice.py`)
- Web voice session → Telugu speech synthesis: loads voice (evidence: `app/web_voice.py`)
- Web client → Authenticated web server: connects
- PCM transport conversion → Web voice session: converts audio
- Runtime configuration → Consent and dialogue state: configures (evidence: `app/dialogue.py`)
- Runtime configuration → Recruitment FAQ matching: configures (evidence: `app/knowledge.py`)
- Runtime configuration → Telugu speech recognition: configures (evidence: `app/speech.py`)
- Runtime configuration → Telugu speech synthesis: configures (evidence: `app/speech.py`)
