# rochakdh/noiseclassificationandreduction architecture

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

- Interactive diagram: https://gitdiagram.com/rochakdh/noiseclassificationandreduction
- Repository: https://github.com/rochakdh/noiseclassificationandreduction

## Overview

DeNoiser is a Streamlit audio app for uploading a WAV file or recording from a microphone, denoising it, and displaying both the reduced-noise output and a predicted noise class. The denoising path runs through a callback into spectral feature preparation, model inference, and audio reconstruction; classification is a separate model-based operation invoked by the interface. The tree and excerpts support these main flows, but do not show details of the trained models or dataset contents.

Main entry points: [`streamlit.py`](https://github.com/rochakdh/noiseclassificationandreduction/blob/master/streamlit.py) (Streamlit interface), [`implementer.py`](https://github.com/rochakdh/noiseclassificationandreduction/blob/master/implementer.py) (Denoising pipeline), [`classification.py`](https://github.com/rochakdh/noiseclassificationandreduction/blob/master/classification.py) (Audio classifier), [`src/recorded/recordedFile.wav`](https://github.com/rochakdh/noiseclassificationandreduction/blob/master/src/recorded/recordedFile.wav) (Recorded WAV)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["User interface"]
  node_app["Streamlit interface<br/>[streamlit.py]"]
  node_callback["Denoise callback<br/>[callbacks.py]"]
end

subgraph group_capture["Audio input"]
  node_recorder["Microphone recorder<br/>[sound.py]"]
  node_recorded["Recorded WAV<br/>[recordedFile.wav]"]
  node_browse["Browse audio"]
end

subgraph group_denoise["Denoising"]
  node_denoiser["Denoising pipeline<br/>[implementer.py]"]
  node_denoise_model["Denoising model<br/>[sekte_model.h5]"]
  node_output["Denoised WAV<br/>[output.wav]"]
end

subgraph group_classify["Noise classification"]
  node_classifier["Audio classifier<br/>[classification.py]"]
  node_class_model["Classification model"]
  node_class_data["Class labels data<br/>[newdf.csv]"]
end

node_user(("User"))
node_paths["Path configuration<br/>[paths_src.py]"]

node_user -->|"chooses audio"| node_app
node_app -->|"starts recording"| node_recorder
node_recorder -->|"writes recording"| node_recorded
node_app -->|"selects recording"| node_recorded
node_app -->|"selects upload"| node_browse
node_app -->|"registers callback"| node_callback
node_callback -->|"invokes"| node_denoiser
node_denoiser -->|"loads model"| node_denoise_model
node_denoiser -->|"reads recording"| node_recorded
node_denoiser -->|"reads upload"| node_browse
node_denoiser -->|"writes result"| node_output
node_app -->|"requests class"| node_classifier
node_classifier -->|"reads labels"| node_class_data
node_classifier -->|"loads model"| node_class_model
node_classifier -->|"reads recording"| node_recorded
node_classifier -->|"reads upload"| node_browse
node_app -->|"plays result"| node_output
node_app -->|"uses configured paths"| node_paths
node_recorder -->|"uses configured paths"| node_paths
node_denoiser -->|"uses configured paths"| node_paths
node_classifier -->|"uses configured paths"| node_paths

click node_app "https://github.com/rochakdh/noiseclassificationandreduction/blob/master/streamlit.py"
click node_callback "https://github.com/rochakdh/noiseclassificationandreduction/blob/master/callbacks.py"
click node_recorder "https://github.com/rochakdh/noiseclassificationandreduction/blob/master/sound.py"
click node_recorded "https://github.com/rochakdh/noiseclassificationandreduction/blob/master/src/recorded/recordedFile.wav"
click node_browse "https://github.com/rochakdh/noiseclassificationandreduction/tree/master/src/browsefromhere"
click node_denoiser "https://github.com/rochakdh/noiseclassificationandreduction/blob/master/implementer.py"
click node_denoise_model "https://github.com/rochakdh/noiseclassificationandreduction/blob/master/src/models/sekte_model.h5"
click node_output "https://github.com/rochakdh/noiseclassificationandreduction/blob/master/src/output/output.wav"
click node_classifier "https://github.com/rochakdh/noiseclassificationandreduction/blob/master/classification.py"
click node_class_model "https://github.com/rochakdh/noiseclassificationandreduction/blob/master/src/models/new_audio_classification.hdf5"
click node_class_data "https://github.com/rochakdh/noiseclassificationandreduction/blob/master/src/newdf.csv"
click node_paths "https://github.com/rochakdh/noiseclassificationandreduction/blob/master/paths_src.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_app,node_callback,node_user toneBlue
class node_recorder,node_recorded,node_browse toneAmber
class node_denoiser,node_denoise_model,node_output toneMint
class node_classifier,node_class_model,node_class_data toneRose
class node_paths toneTeal
```

## Components

### User interface

- [Streamlit interface](https://github.com/rochakdh/noiseclassificationandreduction/blob/master/streamlit.py): `streamlit.py`
- [Denoise callback](https://github.com/rochakdh/noiseclassificationandreduction/blob/master/callbacks.py): `callbacks.py`

### Audio input

- [Microphone recorder](https://github.com/rochakdh/noiseclassificationandreduction/blob/master/sound.py): `sound.py`
- [Recorded WAV](https://github.com/rochakdh/noiseclassificationandreduction/blob/master/src/recorded/recordedFile.wav): `src/recorded/recordedFile.wav`
- [Browse audio](https://github.com/rochakdh/noiseclassificationandreduction/tree/master/src/browsefromhere): `src/browsefromhere`

### Denoising

- [Denoising pipeline](https://github.com/rochakdh/noiseclassificationandreduction/blob/master/implementer.py): `implementer.py`
- [Denoising model](https://github.com/rochakdh/noiseclassificationandreduction/blob/master/src/models/sekte_model.h5): `src/models/sekte_model.h5`
- [Denoised WAV](https://github.com/rochakdh/noiseclassificationandreduction/blob/master/src/output/output.wav): `src/output/output.wav`

### Noise classification

- [Audio classifier](https://github.com/rochakdh/noiseclassificationandreduction/blob/master/classification.py): `classification.py`
- [Classification model](https://github.com/rochakdh/noiseclassificationandreduction/blob/master/src/models/new_audio_classification.hdf5): `src/models/new_audio_classification.hdf5`
- [Class labels data](https://github.com/rochakdh/noiseclassificationandreduction/blob/master/src/newdf.csv): `src/newdf.csv`

### Other components

- **User**
- [Path configuration](https://github.com/rochakdh/noiseclassificationandreduction/blob/master/paths_src.py): `paths_src.py`

## Connections

- User → Streamlit interface: chooses audio (evidence: `streamlit.py`)
- Streamlit interface → Microphone recorder: starts recording (evidence: `streamlit.py`)
- Microphone recorder → Recorded WAV: writes recording (evidence: `sound.py`)
- Streamlit interface → Recorded WAV: selects recording (evidence: `streamlit.py`)
- Streamlit interface → Browse audio: selects upload (evidence: `streamlit.py`)
- Streamlit interface → Denoise callback: registers callback (evidence: `streamlit.py`)
- Denoise callback → Denoising pipeline: invokes (evidence: `callbacks.py`)
- Denoising pipeline → Denoising model: loads model (evidence: `implementer.py`)
- Denoising pipeline → Recorded WAV: reads recording (evidence: `implementer.py`)
- Denoising pipeline → Browse audio: reads upload (evidence: `implementer.py`)
- Denoising pipeline → Denoised WAV: writes result (evidence: `implementer.py`)
- Streamlit interface → Audio classifier: requests class (evidence: `streamlit.py`)
- Audio classifier → Class labels data: reads labels (evidence: `classification.py`)
- Audio classifier → Classification model: loads model (evidence: `classification.py`)
- Audio classifier → Recorded WAV: reads recording (evidence: `classification.py`)
- Audio classifier → Browse audio: reads upload (evidence: `classification.py`)
- Streamlit interface → Denoised WAV: plays result (evidence: `streamlit.py`)
- Streamlit interface → Path configuration: uses configured paths (evidence: `streamlit.py`)
- Microphone recorder → Path configuration: uses configured paths (evidence: `sound.py`)
- Denoising pipeline → Path configuration: uses configured paths (evidence: `implementer.py`)
- Audio classifier → Path configuration: uses configured paths (evidence: `classification.py`)
