# hamzaih2k-1108/automatic-voice-pathology-detection-and-classification-systems architecture

> Architecture diagram of the GitHub repository hamzaih2k-1108/automatic-voice-pathology-detection-and-classification-systems, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/hamzaih2k-1108/automatic-voice-pathology-detection-and-classification-systems
- Repository: https://github.com/hamzaih2k-1108/automatic-voice-pathology-detection-and-classification-systems

## Overview

##### Project type and purpose
- This is a data-driven signal-processing / machine-learning pipeline implemented as a Jupyter notebook.
- Purpose: ingest raw audio (.wav) files, preprocess (pre-emphasis, Fourier transform), train a CNN to detect voice pathologies, and evaluate its performance.

##### File structure
- Top-level:
- README.md (project description)
- Signal_Processing_Project.ipynb (main implementation)
- data_set/
– healthy/ and pathological/ subfolders full of .wav files
- No separate source, tests or deployment folders—everything lives in the notebook.
- Implies a simple linear pipeline rather than microservices or MVC.

##### Key insights from the README
- Four processing stages:
1. Pre-emphasis filter
2. Fourier transform (feature extraction)
3. Build/train CNN model
4. Evaluate model
- No external APIs or web UI—core is a batch ML workflow.

##### Main components and their relationships
a. Data Storage
- Raw .wav files in data_set/healthy and data_set/pathological
b. Preprocessing Pipeline
- Pre-emphasis filter
- Fourier transform (e.g., STFT or FFT)
- Use librosa or scipy.signal
c. Feature Dataset
- Spectrograms, mel-spectrograms or feature matrices
- Stored in memory or on disk as NumPy arrays
d. Model Trainer
- Convolutional Neural Network built with TensorFlow/Keras or PyTorch
- Consumes feature dataset, outputs a trained model artifact
e. Evaluation Module
- Computes metrics (accuracy, confusion matrix, ROC curves)
- Outputs plots and reports in notebook

Data Storage → Preprocessing → Feature Dataset → Model Trainer → Evaluation → Reports

##### Architectural patterns and design principles
- Pipeline pattern: each stage is a discrete transformation
- Separation of concerns: data ingestion, feature extraction, model training, evaluation
- Reproducibility: version your notebook, data, and model artifacts

##### Relevant technologies and libraries
- Python 3.x
- Jupyter Notebook (Signal_Processing_Project.ipynb)
- NumPy, SciPy, librosa for audio processing
- TensorFlow/Keras or PyTorch for CNN
- Matplotlib or Seaborn for visualization

##### Detailed breakdown to capture all elements
1. Data Storage
– Path: data_set/healthy & data_set/pathological
2. Preprocessing
– Pre-emphasis filter (High-pass IIR filter)
– Fourier transform (FFT/STFT)
3. Feature Representation
– Spectrogram / Mel-spectrogram / MFCC arrays
4. Model Architecture
– CNN layers (Conv2D, pooling, dense)
– Loss function, optimizer
5. Model Artifact
– .h5 or .pt file
6. Evaluation
– Metrics (accuracy, precision, recall)
– Plots (confusion matrix, ROC)

## Diagram (Mermaid)

```mermaid
flowchart TD
    README["Project Description & Guidelines"]:::note

    subgraph "Data Storage"
        DS1["Healthy Dataset\n(.wav files)"]:::data
        DS2["Pathological Dataset\n(.wav files)"]:::data
    end

    Preprocessing["Preprocessing Pipeline\n(pre-emphasis filter, FFT/STFT)"]:::compute
    Feature["Feature Representation\n(Spectrogram/MFCC arrays)"]:::data
    Training["Model Trainer\n(CNN build & training)"]:::compute
    Evaluation["Evaluation Module\n(metrics & plots)"]:::output

    DS1 -->|".wav files"| Preprocessing
    DS2 -->|".wav files"| Preprocessing
    Preprocessing -->|"spectrogram arrays"| Feature
    Feature -->|"feature dataset"| Training
    Training -->|"trained model artifact"| Evaluation

    click DS1 "https://github.com/hamzaih2k-1108/automatic-voice-pathology-detection-and-classification-systems/tree/main/data_set/healthy"
    click DS2 "https://github.com/hamzaih2k-1108/automatic-voice-pathology-detection-and-classification-systems/tree/main/data_set/pathological"
    click Preprocessing "https://github.com/hamzaih2k-1108/automatic-voice-pathology-detection-and-classification-systems/blob/main/Signal_Processing_Project.ipynb"
    click Feature "https://github.com/hamzaih2k-1108/automatic-voice-pathology-detection-and-classification-systems/blob/main/Signal_Processing_Project.ipynb"
    click Training "https://github.com/hamzaih2k-1108/automatic-voice-pathology-detection-and-classification-systems/blob/main/Signal_Processing_Project.ipynb"
    click Evaluation "https://github.com/hamzaih2k-1108/automatic-voice-pathology-detection-and-classification-systems/blob/main/Signal_Processing_Project.ipynb"
    click README "https://github.com/hamzaih2k-1108/automatic-voice-pathology-detection-and-classification-systems/blob/main/README.md"

    classDef data fill:#ADD8E6,stroke:#000,stroke-width:1px
    classDef compute fill:#90EE90,stroke:#000,stroke-width:1px
    classDef output fill:#FFA500,stroke:#000,stroke-width:1px
    classDef note fill:#DDDDDD,stroke:#000,stroke-width:1px
```
