# benekashetty013/kannada-ipa-asr architecture

> Architecture diagram of the GitHub repository benekashetty013/kannada-ipa-asr, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/benekashetty013/kannada-ipa-asr
- Repository: https://github.com/benekashetty013/kannada-ipa-asr

## Overview

This repository is a small Kannada speech-recognition project: it records labeled audio, extracts MFCC features, trains a CNN, and presents predictions in a Streamlit interface. The graph distinguishes those stages and the stored dataset, feature arrays, model weights, and prediction log. The README documents the overall workflow; the excerpts show feature extraction and training behavior, plus parts of inference and result rendering. App internals and the exact runtime wiring between artifacts are only partially excerpted, so those links are marked unverified where appropriate.

Main entry points: [`app.py`](https://github.com/benekashetty013/kannada-ipa-asr/blob/main/app.py) (Streamlit Interface), [`dataset/record_dataset.py`](https://github.com/benekashetty013/kannada-ipa-asr/blob/main/dataset/record_dataset.py) (Audio Recorder), [`dataset`](https://github.com/benekashetty013/kannada-ipa-asr/tree/main/dataset) (Labeled WAVs), [`extract_features.py`](https://github.com/benekashetty013/kannada-ipa-asr/blob/main/extract_features.py) (MFCC Extraction)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Audio Data"]
  node_recorder["Audio Recorder<br/>[record_dataset.py]"]
  node_wavset["Labeled WAVs"]
end

subgraph group_modeling["Model Pipeline"]
  node_extract["MFCC Extraction"]
  node_features["Feature Arrays"]
  node_trainer["CNN Training<br/>[train_model.py]"]
  node_weights["Model Weights<br/>[best_model.pt]"]
end

subgraph group_interface["Recognition UI"]
  node_webui["Streamlit Interface<br/>[app.py]"]
  node_preprocess["Audio Preprocessing<br/>[app.py]"]
  node_classifier["CNN Inference<br/>[app.py]"]
  node_dictionary["Word Details<br/>[app.py]"]
  node_analysis["Acoustic Analysis<br/>[app.py]"]
  node_log["Prediction Log"]
end

node_speaker(("Speaker"))

node_speaker -->|"speaks word"| node_recorder
node_recorder -->|"saves recordings"| node_wavset
node_wavset -->|"extracts features"| node_extract
node_extract -->|"writes arrays"| node_features
node_features -->|"trains from"| node_trainer
node_trainer -->|"saves weights"| node_weights
node_speaker -.->|"provides audio"| node_webui
node_webui -->|"prepares audio"| node_preprocess
node_preprocess -->|"provides tensor"| node_classifier
node_weights -.->|"loads model"| node_classifier
node_classifier -->|"returns predictions"| node_webui
node_webui -->|"looks up word"| node_dictionary
node_webui -->|"renders spectrogram"| node_analysis
node_webui -->|"logs prediction"| node_log

click node_recorder "https://github.com/benekashetty013/kannada-ipa-asr/blob/main/dataset/record_dataset.py"
click node_wavset "https://github.com/benekashetty013/kannada-ipa-asr/tree/main/dataset"
click node_extract "https://github.com/benekashetty013/kannada-ipa-asr/blob/main/extract_features.py"
click node_features "https://github.com/benekashetty013/kannada-ipa-asr/tree/main/features"
click node_trainer "https://github.com/benekashetty013/kannada-ipa-asr/blob/main/train_model.py"
click node_weights "https://github.com/benekashetty013/kannada-ipa-asr/blob/main/model/best_model.pt"
click node_webui "https://github.com/benekashetty013/kannada-ipa-asr/blob/main/app.py"
click node_preprocess "https://github.com/benekashetty013/kannada-ipa-asr/blob/main/app.py"
click node_classifier "https://github.com/benekashetty013/kannada-ipa-asr/blob/main/app.py"
click node_dictionary "https://github.com/benekashetty013/kannada-ipa-asr/blob/main/app.py"
click node_analysis "https://github.com/benekashetty013/kannada-ipa-asr/blob/main/app.py"
click node_log "https://github.com/benekashetty013/kannada-ipa-asr/blob/main/results/predictions_log.csv"

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_recorder,node_wavset toneBlue
class node_extract,node_features,node_trainer,node_weights toneAmber
class node_webui,node_preprocess,node_classifier,node_dictionary,node_analysis,node_log toneMint
class node_speaker toneIndigo
```

## Components

### Audio Data

- [Audio Recorder](https://github.com/benekashetty013/kannada-ipa-asr/blob/main/dataset/record_dataset.py): `dataset/record_dataset.py`
- [Labeled WAVs](https://github.com/benekashetty013/kannada-ipa-asr/tree/main/dataset): `dataset`

### Model Pipeline

- [MFCC Extraction](https://github.com/benekashetty013/kannada-ipa-asr/blob/main/extract_features.py): `extract_features.py`
- [Feature Arrays](https://github.com/benekashetty013/kannada-ipa-asr/tree/main/features): `features`
- [CNN Training](https://github.com/benekashetty013/kannada-ipa-asr/blob/main/train_model.py): `train_model.py`
- [Model Weights](https://github.com/benekashetty013/kannada-ipa-asr/blob/main/model/best_model.pt): `model/best_model.pt`

### Recognition UI

- [Streamlit Interface](https://github.com/benekashetty013/kannada-ipa-asr/blob/main/app.py): `app.py`
- [Audio Preprocessing](https://github.com/benekashetty013/kannada-ipa-asr/blob/main/app.py): `app.py`
- [CNN Inference](https://github.com/benekashetty013/kannada-ipa-asr/blob/main/app.py): `app.py`
- [Word Details](https://github.com/benekashetty013/kannada-ipa-asr/blob/main/app.py): `app.py`
- [Acoustic Analysis](https://github.com/benekashetty013/kannada-ipa-asr/blob/main/app.py): `app.py`
- [Prediction Log](https://github.com/benekashetty013/kannada-ipa-asr/blob/main/results/predictions_log.csv): `results/predictions_log.csv`

### Other components

- **Speaker**

## Connections

- Speaker → Audio Recorder: speaks word (evidence: `dataset/record_dataset.py`)
- Audio Recorder → Labeled WAVs: saves recordings (evidence: `dataset/record_dataset.py`)
- Labeled WAVs → MFCC Extraction: extracts features (evidence: `extract_features.py`)
- MFCC Extraction → Feature Arrays: writes arrays (evidence: `extract_features.py`)
- Feature Arrays → CNN Training: trains from (evidence: `train_model.py`)
- CNN Training → Model Weights: saves weights (evidence: `train_model.py`)
- Speaker → Streamlit Interface: provides audio (evidence: `README.md`)
- Streamlit Interface → Audio Preprocessing: prepares audio (evidence: `app.py`)
- Audio Preprocessing → CNN Inference: provides tensor (evidence: `app.py`)
- Model Weights → CNN Inference: loads model
- CNN Inference → Streamlit Interface: returns predictions (evidence: `app.py`)
- Streamlit Interface → Word Details: looks up word (evidence: `app.py`)
- Streamlit Interface → Acoustic Analysis: renders spectrogram (evidence: `app.py`)
- Streamlit Interface → Prediction Log: logs prediction (evidence: `app.py`)
