# habeeboss/voicerecognition architecture

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

- Interactive diagram: https://gitdiagram.com/habeeboss/voicerecognition
- Repository: https://github.com/habeeboss/voicerecognition

## Overview

This is a Streamlit audio speaker-classification app. A user uploads an audio file, selects a model (or random selection), and requests classification; the app extracts audio features, applies the corresponding scaler and model, then displays a speaker label. The four model/scaler pairs are distinct runtime inference options. Relationships shown are those visible in the sampled app; no README documentation was provided.

Main entry points: [`appStreamlit.py`](https://github.com/habeeboss/voicerecognition/blob/main/appStreamlit.py) (Prediction dispatch), [`ANN MODEL.keras`](https://github.com/habeeboss/voicerecognition/blob/main/ANN%20MODEL.keras) (ANN model), [`ANN SCALER.joblib`](https://github.com/habeeboss/voicerecognition/blob/main/ANN%20SCALER.joblib) (ANN scaler), [`CNN MODEL.keras`](https://github.com/habeeboss/voicerecognition/blob/main/CNN%20MODEL.keras) (CNN model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["User interface"]
  node_ui["Upload and results<br/>[appStreamlit.py]"]
  node_audio["Audio loading<br/>[appStreamlit.py]"]
end

subgraph group_inference["Inference"]
  node_features["Feature extraction<br/>[appStreamlit.py]"]
  node_dispatch["Prediction dispatch<br/>[appStreamlit.py]"]
  node_labels["Speaker labels<br/>[appStreamlit.py]"]
end

subgraph group_artifacts["Model artifacts"]
  node_ann["ANN model<br/>[ANN MODEL.keras]"]
  node_ann_scaler["ANN scaler<br/>[ANN SCALER.joblib]"]
  node_cnn["CNN model<br/>[CNN MODEL.keras]"]
  node_cnn_scaler["CNN scaler<br/>[CNN SCALER.joblib]"]
  node_rnn["RNN model<br/>[RNN MODEL.keras]"]
  node_rnn_scaler["RNN scaler<br/>[RNN SCALER.joblib]"]
  node_knn["KNN model<br/>[KNN MODEL.joblib]"]
  node_knn_scaler["KNN scaler<br/>[KNN SCALER.joblib]"]
end

node_user(("User"))

node_user -->|"uploads and selects"| node_ui
node_ui -->|"loads audio"| node_audio
node_ui -->|"requests prediction"| node_dispatch
node_dispatch -->|"extracts features"| node_features
node_dispatch -->|"transforms with"| node_ann_scaler
node_dispatch -->|"predicts with"| node_ann
node_dispatch -->|"transforms with"| node_cnn_scaler
node_dispatch -->|"predicts with"| node_cnn
node_dispatch -->|"transforms with"| node_rnn_scaler
node_dispatch -->|"predicts with"| node_rnn
node_dispatch -->|"transforms with"| node_knn_scaler
node_dispatch -->|"predicts with"| node_knn
node_dispatch -->|"maps predictions"| node_labels
node_ui -->|"displays label"| node_labels
node_ui -->|"shows result"| node_user

click node_ui "https://github.com/habeeboss/voicerecognition/blob/main/appStreamlit.py"
click node_audio "https://github.com/habeeboss/voicerecognition/blob/main/appStreamlit.py"
click node_features "https://github.com/habeeboss/voicerecognition/blob/main/appStreamlit.py"
click node_dispatch "https://github.com/habeeboss/voicerecognition/blob/main/appStreamlit.py"
click node_labels "https://github.com/habeeboss/voicerecognition/blob/main/appStreamlit.py"
click node_ann "https://github.com/habeeboss/voicerecognition/blob/main/ANN%20MODEL.keras"
click node_ann_scaler "https://github.com/habeeboss/voicerecognition/blob/main/ANN%20SCALER.joblib"
click node_cnn "https://github.com/habeeboss/voicerecognition/blob/main/CNN%20MODEL.keras"
click node_cnn_scaler "https://github.com/habeeboss/voicerecognition/blob/main/CNN%20SCALER.joblib"
click node_rnn "https://github.com/habeeboss/voicerecognition/blob/main/RNN%20MODEL.keras"
click node_rnn_scaler "https://github.com/habeeboss/voicerecognition/blob/main/RNN%20SCALER.joblib"
click node_knn "https://github.com/habeeboss/voicerecognition/blob/main/KNN%20MODEL.joblib"
click node_knn_scaler "https://github.com/habeeboss/voicerecognition/blob/main/KNN%20SCALER.joblib"

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_ui,node_audio,node_user toneBlue
class node_features,node_dispatch,node_labels toneAmber
class node_ann,node_ann_scaler,node_cnn,node_cnn_scaler,node_rnn,node_rnn_scaler,node_knn,node_knn_scaler toneMint
```

## Components

### User interface

- [Upload and results](https://github.com/habeeboss/voicerecognition/blob/main/appStreamlit.py): `appStreamlit.py`
- [Audio loading](https://github.com/habeeboss/voicerecognition/blob/main/appStreamlit.py): `appStreamlit.py`

### Inference

- [Feature extraction](https://github.com/habeeboss/voicerecognition/blob/main/appStreamlit.py): `appStreamlit.py`
- [Prediction dispatch](https://github.com/habeeboss/voicerecognition/blob/main/appStreamlit.py): `appStreamlit.py`
- [Speaker labels](https://github.com/habeeboss/voicerecognition/blob/main/appStreamlit.py): `appStreamlit.py`

### Model artifacts

- [ANN model](https://github.com/habeeboss/voicerecognition/blob/main/ANN%20MODEL.keras): `ANN MODEL.keras`
- [ANN scaler](https://github.com/habeeboss/voicerecognition/blob/main/ANN%20SCALER.joblib): `ANN SCALER.joblib`
- [CNN model](https://github.com/habeeboss/voicerecognition/blob/main/CNN%20MODEL.keras): `CNN MODEL.keras`
- [CNN scaler](https://github.com/habeeboss/voicerecognition/blob/main/CNN%20SCALER.joblib): `CNN SCALER.joblib`
- [RNN model](https://github.com/habeeboss/voicerecognition/blob/main/RNN%20MODEL.keras): `RNN MODEL.keras`
- [RNN scaler](https://github.com/habeeboss/voicerecognition/blob/main/RNN%20SCALER.joblib): `RNN SCALER.joblib`
- [KNN model](https://github.com/habeeboss/voicerecognition/blob/main/KNN%20MODEL.joblib): `KNN MODEL.joblib`
- [KNN scaler](https://github.com/habeeboss/voicerecognition/blob/main/KNN%20SCALER.joblib): `KNN SCALER.joblib`

### Other components

- **User**

## Connections

- User → Upload and results: uploads and selects (evidence: `appStreamlit.py`)
- Upload and results → Audio loading: loads audio (evidence: `appStreamlit.py`)
- Upload and results → Prediction dispatch: requests prediction (evidence: `appStreamlit.py`)
- Prediction dispatch → Feature extraction: extracts features (evidence: `appStreamlit.py`)
- Prediction dispatch → ANN scaler: transforms with (evidence: `appStreamlit.py`)
- Prediction dispatch → ANN model: predicts with (evidence: `appStreamlit.py`)
- Prediction dispatch → CNN scaler: transforms with (evidence: `appStreamlit.py`)
- Prediction dispatch → CNN model: predicts with (evidence: `appStreamlit.py`)
- Prediction dispatch → RNN scaler: transforms with (evidence: `appStreamlit.py`)
- Prediction dispatch → RNN model: predicts with (evidence: `appStreamlit.py`)
- Prediction dispatch → KNN scaler: transforms with (evidence: `appStreamlit.py`)
- Prediction dispatch → KNN model: predicts with (evidence: `appStreamlit.py`)
- Prediction dispatch → Speaker labels: maps predictions (evidence: `appStreamlit.py`)
- Upload and results → Speaker labels: displays label (evidence: `appStreamlit.py`)
- Upload and results → User: shows result (evidence: `appStreamlit.py`)
