# infinity-man/browser-noise-free-mic architecture

> Architecture diagram of the GitHub repository infinity-man/browser-noise-free-mic, 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/infinity-man/browser-noise-free-mic
- Repository: https://github.com/infinity-man/browser-noise-free-mic

## Overview

Browser Noise Free Mic is a static, privacy-first web app for 48 kHz neural noise reduction. Users capture or upload audio, choose an enhancement engine, process audio locally, then review, master, and export a take—or route enhanced microphone audio to a virtual cable for calls. The graph preserves the documented recording, live-mic, studio, model-training, persistence, and offline-PWA capabilities. Some page-level wiring is documented only in the README; edges based on it cite that file, and unsampled implementation details are not inferred.

Main entry points: [`web/outputController.js`](https://github.com/infinity-man/browser-noise-free-mic/blob/main/web/outputController.js) (Studio Controller), [`web/audioEngine.js`](https://github.com/infinity-man/browser-noise-free-mic/blob/main/web/audioEngine.js) (Enhancement Engine), [`web/input.html`](https://github.com/infinity-man/browser-noise-free-mic/blob/main/web/input.html) (Capture and Upload), [`web/processing.html`](https://github.com/infinity-man/browser-noise-free-mic/blob/main/web/processing.html) (Processing Handoff)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Capture and Studio"]
  node_capture["Capture and Upload<br/>[input.html]"]
  node_processing["Processing Handoff<br/>[processing.html]"]
  node_studio["Studio Console<br/>[output.html]"]
  node_controller["Studio Controller"]
end

subgraph group_audio["Audio Processing"]
  node_codec["Audio Codec<br/>[audioCodec.js]"]
  node_engine["Enhancement Engine<br/>[audioEngine.js]"]
  node_mastering["Mastering Chain<br/>[masteringChain.js]"]
end

subgraph group_live["Live Mic"]
  node_worklet["Stream Worklet<br/>[streamWorklet.js]"]
end

subgraph group_state["Local State and PWA"]
  node_store[("Take and Preference Store<br/>[appStore.js]")]
  node_ui["Shared UI Helpers<br/>[uiCommon.js]"]
  node_serviceworker["Offline Cache<br/>[sw.js]"]
end

subgraph group_models["Models and Training"]
  node_models["Shipped ONNX Models"]
  node_training["GTCRN Training and Export<br/>[train_gtcrn48k.py]"]
end

node_user(("User"))
node_mic(("Microphone and Audio Devices"))
node_cable["Virtual Cable"]
node_callapp(("Call or Recording App"))

node_user -->|"records or uploads"| node_capture
node_capture -->|"starts processing"| node_processing
node_processing -->|"requests enhancement"| node_engine
node_engine -->|"loads model"| node_models
node_engine -->|"applies processing"| node_mastering
node_processing -->|"opens result"| node_studio
node_studio -->|"runs studio"| node_controller
node_controller -->|"loads take"| node_store
node_controller -.->|"exports audio"| node_codec
node_user -->|"selects input"| node_mic
node_mic -->|"streams audio"| node_worklet
node_worklet -.->|"sends frames"| node_controller
node_controller -->|"processes live audio"| node_engine
node_controller -->|"returns enhanced audio"| node_worklet
node_controller -->|"routes output"| node_cable
node_cable -->|"provides microphone"| node_callapp
node_controller -.->|"uses live chain"| node_mastering
node_capture -.->|"decodes audio"| node_codec
node_controller -.->|"saves takes"| node_store
node_ui -->|"persists takes"| node_store
node_serviceworker -->|"caches models"| node_models
node_training -->|"exports weights"| node_models

click node_capture "https://github.com/infinity-man/browser-noise-free-mic/blob/main/web/input.html"
click node_processing "https://github.com/infinity-man/browser-noise-free-mic/blob/main/web/processing.html"
click node_studio "https://github.com/infinity-man/browser-noise-free-mic/blob/main/web/output.html"
click node_controller "https://github.com/infinity-man/browser-noise-free-mic/blob/main/web/outputController.js"
click node_codec "https://github.com/infinity-man/browser-noise-free-mic/blob/main/web/audioCodec.js"
click node_engine "https://github.com/infinity-man/browser-noise-free-mic/blob/main/web/audioEngine.js"
click node_mastering "https://github.com/infinity-man/browser-noise-free-mic/blob/main/web/masteringChain.js"
click node_worklet "https://github.com/infinity-man/browser-noise-free-mic/blob/main/web/streamWorklet.js"
click node_store "https://github.com/infinity-man/browser-noise-free-mic/blob/main/web/appStore.js"
click node_ui "https://github.com/infinity-man/browser-noise-free-mic/blob/main/web/uiCommon.js"
click node_serviceworker "https://github.com/infinity-man/browser-noise-free-mic/blob/main/web/sw.js"
click node_models "https://github.com/infinity-man/browser-noise-free-mic/tree/main/web/models"
click node_training "https://github.com/infinity-man/browser-noise-free-mic/blob/main/training/train_gtcrn48k.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_capture,node_processing,node_studio,node_controller,node_user toneBlue
class node_codec,node_engine,node_mastering toneAmber
class node_worklet toneMint
class node_store,node_ui,node_serviceworker toneRose
class node_models,node_training,node_mic,node_cable,node_callapp toneIndigo
```

## Components

### Capture and Studio

- [Capture and Upload](https://github.com/infinity-man/browser-noise-free-mic/blob/main/web/input.html): `web/input.html`
- [Processing Handoff](https://github.com/infinity-man/browser-noise-free-mic/blob/main/web/processing.html): `web/processing.html`
- [Studio Console](https://github.com/infinity-man/browser-noise-free-mic/blob/main/web/output.html): `web/output.html`
- [Studio Controller](https://github.com/infinity-man/browser-noise-free-mic/blob/main/web/outputController.js): `web/outputController.js`

### Audio Processing

- [Audio Codec](https://github.com/infinity-man/browser-noise-free-mic/blob/main/web/audioCodec.js): `web/audioCodec.js`
- [Enhancement Engine](https://github.com/infinity-man/browser-noise-free-mic/blob/main/web/audioEngine.js): `web/audioEngine.js`
- [Mastering Chain](https://github.com/infinity-man/browser-noise-free-mic/blob/main/web/masteringChain.js): `web/masteringChain.js`

### Live Mic

- [Stream Worklet](https://github.com/infinity-man/browser-noise-free-mic/blob/main/web/streamWorklet.js): `web/streamWorklet.js`

### Local State and PWA

- [Take and Preference Store](https://github.com/infinity-man/browser-noise-free-mic/blob/main/web/appStore.js): `web/appStore.js`
- [Shared UI Helpers](https://github.com/infinity-man/browser-noise-free-mic/blob/main/web/uiCommon.js): `web/uiCommon.js`
- [Offline Cache](https://github.com/infinity-man/browser-noise-free-mic/blob/main/web/sw.js): `web/sw.js`

### Models and Training

- [Shipped ONNX Models](https://github.com/infinity-man/browser-noise-free-mic/tree/main/web/models): `web/models`
- [GTCRN Training and Export](https://github.com/infinity-man/browser-noise-free-mic/blob/main/training/train_gtcrn48k.py): `training/train_gtcrn48k.py`

### Other components

- **User**
- **Microphone and Audio Devices**
- **Virtual Cable**
- **Call or Recording App**

## Connections

- User → Capture and Upload: records or uploads (evidence: `README.md`)
- Capture and Upload → Processing Handoff: starts processing (evidence: `README.md`)
- Processing Handoff → Enhancement Engine: requests enhancement (evidence: `README.md`)
- Enhancement Engine → Shipped ONNX Models: loads model (evidence: `web/audioEngine.js`)
- Enhancement Engine → Mastering Chain: applies processing (evidence: `web/audioEngine.js`)
- Processing Handoff → Studio Console: opens result (evidence: `README.md`)
- Studio Console → Studio Controller: runs studio (evidence: `README.md`)
- Studio Controller → Take and Preference Store: loads take (evidence: `web/outputController.js`)
- Studio Controller → Audio Codec: exports audio
- User → Microphone and Audio Devices: selects input (evidence: `README.md`)
- Microphone and Audio Devices → Stream Worklet: streams audio (evidence: `README.md`)
- Stream Worklet → Studio Controller: sends frames
- Studio Controller → Enhancement Engine: processes live audio (evidence: `web/outputController.js`)
- Studio Controller → Stream Worklet: returns enhanced audio (evidence: `web/outputController.js`)
- Studio Controller → Virtual Cable: routes output (evidence: `README.md`)
- Virtual Cable → Call or Recording App: provides microphone (evidence: `README.md`)
- Studio Controller → Mastering Chain: uses live chain
- Capture and Upload → Audio Codec: decodes audio
- Studio Controller → Take and Preference Store: saves takes
- Shared UI Helpers → Take and Preference Store: persists takes (evidence: `web/uiCommon.js`)
- Offline Cache → Shipped ONNX Models: caches models (evidence: `web/sw.js`)
- GTCRN Training and Export → Shipped ONNX Models: exports weights (evidence: `training/train_gtcrn48k.py`)
