# tarunpurohit11/silentvoice architecture

> Architecture diagram of the GitHub repository tarunpurohit11/silentvoice, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/tarunpurohit11/silentvoice
- Repository: https://github.com/tarunpurohit11/silentvoice

## Overview

Silent Voice is a real-time sign-language-to-text-and-speech application. Its main workflow captures webcam frames, tracks hands, and branches into buffered static-letter or temporal dynamic-word recognition; the user can then submit accumulated signs for sentence restructuring and speech output. The dashboard presents live and corrected results. The graph preserves both recognition branches and their feature-processing layers. Sampled source supports the runtime wiring; README capability statements support the broader product description, while unsampled subsystem internals are not inferred.

Main entry points: [`main.py`](https://github.com/tarunpurohit11/silentvoice/blob/main/main.py) (Recognition Runtime), [`models/dynamic_model.py`](https://github.com/tarunpurohit11/silentvoice/blob/main/models/dynamic_model.py) (Dynamic Classifier), [`capture/camera.py`](https://github.com/tarunpurohit11/silentvoice/blob/main/capture/camera.py) (Camera Input), [`processing/feature_extractor.py`](https://github.com/tarunpurohit11/silentvoice/blob/main/processing/feature_extractor.py) (Static Features)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_capture["Capture and Tracking"]
  node_camera["Camera Input<br/>[camera.py]"]
  node_tracker["Hand Tracking<br/>[hand_tracking.py]"]
end

subgraph group_recognition["Gesture Recognition"]
  node_runtime["Recognition Runtime<br/>[main.py]"]
  node_static_features["Static Features"]
  node_static_model["Static Classifier<br/>[static_model.py]"]
  node_dynamic_features["Two-Hand Features"]
  node_dynamic_model["Dynamic Classifier<br/>[dynamic_model.py]"]
end

subgraph group_language["Language and Output"]
  node_sentence["Sentence Builder"]
  node_display["Dashboard<br/>[display.py]"]
  node_speaker["Speech Queue<br/>[speaker.py]"]
end

subgraph group_internals["Recognition Internals"]
  node_config["Model Configuration<br/>[config.py]"]
  node_geometry["Geometry Helpers<br/>[geometry.py]"]
  node_frame_buffer["Prediction Buffer<br/>[buffer.py]"]
  node_sequence_buffer["Sequence Buffer<br/>[sequence_buffer.py]"]
  node_sequence_utils["Sequence Normalizer<br/>[sequence_utils.py]"]
end

node_user(("Signer"))
node_webcam["Webcam"]
node_audio["Spoken Audio"]

node_user -->|"performs signs"| node_webcam
node_webcam -->|"video input"| node_camera
node_camera -->|"reads frames"| node_runtime
node_runtime -->|"tracks hands"| node_tracker
node_runtime -->|"extracts static"| node_static_features
node_runtime -->|"predicts letters"| node_static_model
node_runtime -->|"extracts motion"| node_dynamic_features
node_runtime -->|"predicts words"| node_dynamic_model
node_runtime -->|"stabilizes predictions"| node_frame_buffer
node_static_model -->|"loads encoder path"| node_config
node_static_features -->|"computes angles"| node_geometry
node_dynamic_model -->|"buffers frames"| node_sequence_buffer
node_dynamic_model -->|"normalizes sequence"| node_sequence_utils
node_dynamic_model -->|"adds velocity"| node_dynamic_features
node_runtime -->|"restructures text"| node_sentence
node_runtime -->|"renders status"| node_display
node_runtime -->|"queues sentence"| node_speaker
node_speaker -->|"speaks text"| node_audio

click node_camera "https://github.com/tarunpurohit11/silentvoice/blob/main/capture/camera.py"
click node_tracker "https://github.com/tarunpurohit11/silentvoice/blob/main/processing/hand_tracking.py"
click node_runtime "https://github.com/tarunpurohit11/silentvoice/blob/main/main.py"
click node_static_features "https://github.com/tarunpurohit11/silentvoice/blob/main/processing/feature_extractor.py"
click node_static_model "https://github.com/tarunpurohit11/silentvoice/blob/main/models/static_model.py"
click node_dynamic_features "https://github.com/tarunpurohit11/silentvoice/blob/main/processing/feature_extractor_2hand.py"
click node_dynamic_model "https://github.com/tarunpurohit11/silentvoice/blob/main/models/dynamic_model.py"
click node_config "https://github.com/tarunpurohit11/silentvoice/blob/main/config.py"
click node_geometry "https://github.com/tarunpurohit11/silentvoice/blob/main/utils/geometry.py"
click node_frame_buffer "https://github.com/tarunpurohit11/silentvoice/blob/main/utils/buffer.py"
click node_sequence_buffer "https://github.com/tarunpurohit11/silentvoice/blob/main/utils/sequence_buffer.py"
click node_sequence_utils "https://github.com/tarunpurohit11/silentvoice/blob/main/utils/sequence_utils.py"
click node_sentence "https://github.com/tarunpurohit11/silentvoice/blob/main/sentence/sentence_builder.py"
click node_display "https://github.com/tarunpurohit11/silentvoice/blob/main/output/display.py"
click node_speaker "https://github.com/tarunpurohit11/silentvoice/blob/main/ttl/speaker.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_camera,node_tracker toneBlue
class node_runtime,node_static_features,node_static_model,node_dynamic_features,node_dynamic_model toneAmber
class node_sentence,node_display,node_speaker toneMint
class node_config,node_geometry,node_frame_buffer,node_sequence_buffer,node_sequence_utils toneRose
class node_user,node_webcam,node_audio toneIndigo
```

## Components

### Capture and Tracking

- [Camera Input](https://github.com/tarunpurohit11/silentvoice/blob/main/capture/camera.py): `capture/camera.py`
- [Hand Tracking](https://github.com/tarunpurohit11/silentvoice/blob/main/processing/hand_tracking.py): `processing/hand_tracking.py`

### Gesture Recognition

- [Recognition Runtime](https://github.com/tarunpurohit11/silentvoice/blob/main/main.py): `main.py`
- [Static Features](https://github.com/tarunpurohit11/silentvoice/blob/main/processing/feature_extractor.py): `processing/feature_extractor.py`
- [Static Classifier](https://github.com/tarunpurohit11/silentvoice/blob/main/models/static_model.py): `models/static_model.py`
- [Two-Hand Features](https://github.com/tarunpurohit11/silentvoice/blob/main/processing/feature_extractor_2hand.py): `processing/feature_extractor_2hand.py`
- [Dynamic Classifier](https://github.com/tarunpurohit11/silentvoice/blob/main/models/dynamic_model.py): `models/dynamic_model.py`

### Language and Output

- [Sentence Builder](https://github.com/tarunpurohit11/silentvoice/blob/main/sentence/sentence_builder.py): `sentence/sentence_builder.py`
- [Dashboard](https://github.com/tarunpurohit11/silentvoice/blob/main/output/display.py): `output/display.py`
- [Speech Queue](https://github.com/tarunpurohit11/silentvoice/blob/main/ttl/speaker.py): `ttl/speaker.py`

### Recognition Internals

- [Model Configuration](https://github.com/tarunpurohit11/silentvoice/blob/main/config.py): `config.py`
- [Geometry Helpers](https://github.com/tarunpurohit11/silentvoice/blob/main/utils/geometry.py): `utils/geometry.py`
- [Prediction Buffer](https://github.com/tarunpurohit11/silentvoice/blob/main/utils/buffer.py): `utils/buffer.py`
- [Sequence Buffer](https://github.com/tarunpurohit11/silentvoice/blob/main/utils/sequence_buffer.py): `utils/sequence_buffer.py`
- [Sequence Normalizer](https://github.com/tarunpurohit11/silentvoice/blob/main/utils/sequence_utils.py): `utils/sequence_utils.py`

### Other components

- **Signer**
- **Webcam**
- **Spoken Audio**

## Connections

- Signer → Webcam: performs signs (evidence: `README.md`)
- Webcam → Camera Input: video input (evidence: `README.md`)
- Camera Input → Recognition Runtime: reads frames (evidence: `main.py`)
- Recognition Runtime → Hand Tracking: tracks hands (evidence: `main.py`)
- Recognition Runtime → Static Features: extracts static (evidence: `main.py`)
- Recognition Runtime → Static Classifier: predicts letters (evidence: `main.py`)
- Recognition Runtime → Two-Hand Features: extracts motion (evidence: `main.py`)
- Recognition Runtime → Dynamic Classifier: predicts words (evidence: `main.py`)
- Recognition Runtime → Prediction Buffer: stabilizes predictions (evidence: `main.py`)
- Static Classifier → Model Configuration: loads encoder path (evidence: `models/static_model.py`)
- Static Features → Geometry Helpers: computes angles (evidence: `processing/feature_extractor.py`)
- Dynamic Classifier → Sequence Buffer: buffers frames (evidence: `models/dynamic_model.py`)
- Dynamic Classifier → Sequence Normalizer: normalizes sequence (evidence: `models/dynamic_model.py`)
- Dynamic Classifier → Two-Hand Features: adds velocity (evidence: `models/dynamic_model.py`)
- Recognition Runtime → Sentence Builder: restructures text (evidence: `main.py`)
- Recognition Runtime → Dashboard: renders status (evidence: `main.py`)
- Recognition Runtime → Speech Queue: queues sentence (evidence: `main.py`)
- Speech Queue → Spoken Audio: speaks text (evidence: `ttl/speaker.py`)
