# aryamaandash/guitar-style-classifier architecture

> Architecture diagram of the GitHub repository aryamaandash/guitar-style-classifier, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/aryamaandash/guitar-style-classifier
- Repository: https://github.com/aryamaandash/guitar-style-classifier
- Video tour (about a minute): https://gitdiagram.com/aryamaandash/guitar-style-classifier/video

## Overview

Guitar Style Classifier combines a Next.js presentation and browser-side WAV demo with a Python audio-to-model workflow. Recordings are split into one-second clips, quality-checked, used to train and evaluate a baseline classifier, then consumed by live recognition from an audio interface. The site also presents labels, pipeline details, and stored evaluation results. The graph reflects documented workflow and sampled source; training internals are only partially excerpted, and the tree does not contain raw/processed audio or the trained model artifact.

Main entry points: [`src/live_predict.py`](https://github.com/aryamaandash/guitar-style-classifier/blob/main/src/live_predict.py) (Live recognition), [`src/train_baseline.py`](https://github.com/aryamaandash/guitar-style-classifier/blob/main/src/train_baseline.py) (Baseline training), [`app/page.tsx`](https://github.com/aryamaandash/guitar-style-classifier/blob/main/app/page.tsx) (Classifier site), [`src/split_audio.py`](https://github.com/aryamaandash/guitar-style-classifier/blob/main/src/split_audio.py) (Clip splitter)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_website["Website"]
  node_webpage["Classifier site<br/>[page.tsx]"]
  node_webdata["Site model data<br/>[model-data.ts]"]
  node_demo["WAV demo"]
  node_demoprediction["Demo prediction"]
end

subgraph group_dataset["Audio preparation"]
  node_sessions["Session metadata<br/>[sessions.csv]"]
  node_splitter["Clip splitter<br/>[split_audio.py]"]
  node_clips["Clip metadata<br/>[clips.csv]"]
  node_processed["One-second clips"]
end

subgraph group_modeling["Training and QC"]
  node_qc["Audio quality control<br/>[qc_audio_clips.py]"]
  node_qcreports["QC reports"]
  node_trainer["Baseline training<br/>[train_baseline.py]"]
  node_model["Trained classifier"]
  node_evaluation["Evaluation artifacts"]
end

subgraph group_recognition["Recognition"]
  node_live["Live recognition<br/>[live_predict.py]"]
  node_livefeatures["Shared feature extraction<br/>[train_baseline.py]"]
  node_prediction["Smoothed prediction<br/>[live_predict.py]"]
end

node_visitor(("Website visitor"))
node_browseraudio["Uploaded WAV"]
node_recordings["Raw recordings"]
node_guitarist(("Guitarist"))
node_audiointerface["Audio input device"]

node_visitor -->|"opens"| node_webpage
node_webpage -->|"reads display data"| node_webdata
node_webpage -->|"renders"| node_demo
node_visitor -->|"uploads WAV"| node_demo
node_browseraudio -->|"decodes"| node_demo
node_demo -->|"classifies locally"| node_demoprediction
node_demoprediction -->|"shows probabilities"| node_visitor
node_recordings -->|"reads WAV"| node_splitter
node_sessions -->|"selects recordings"| node_splitter
node_splitter -->|"writes clips"| node_processed
node_splitter -->|"writes metadata"| node_clips
node_processed -->|"scans clips"| node_qc
node_clips -->|"reads metadata"| node_qc
node_qc -->|"writes reports"| node_qcreports
node_clips -->|"loads clip records"| node_trainer
node_sessions -->|"assigns splits"| node_trainer
node_processed -->|"loads audio"| node_trainer
node_trainer -->|"trains and saves"| node_model
node_trainer -->|"writes metrics"| node_evaluation
node_webpage -->|"displays results"| node_evaluation
node_guitarist -->|"plays guitar"| node_audiointerface
node_audiointerface -->|"streams audio"| node_live
node_live -->|"requests features"| node_livefeatures
node_livefeatures -->|"returns feature vector"| node_live
node_live -->|"loads and predicts"| node_model
node_live -->|"smooths probabilities"| node_prediction
node_prediction -->|"prints label and confidence"| node_guitarist

click node_webpage "https://github.com/aryamaandash/guitar-style-classifier/blob/main/app/page.tsx"
click node_webdata "https://github.com/aryamaandash/guitar-style-classifier/blob/main/lib/model-data.ts"
click node_demo "https://github.com/aryamaandash/guitar-style-classifier/blob/main/components/classifier-demo.tsx"
click node_demoprediction "https://github.com/aryamaandash/guitar-style-classifier/blob/main/components/classifier-demo.tsx"
click node_sessions "https://github.com/aryamaandash/guitar-style-classifier/blob/main/data/metadata/sessions.csv"
click node_splitter "https://github.com/aryamaandash/guitar-style-classifier/blob/main/src/split_audio.py"
click node_clips "https://github.com/aryamaandash/guitar-style-classifier/blob/main/data/metadata/clips.csv"
click node_qc "https://github.com/aryamaandash/guitar-style-classifier/blob/main/src/qc_audio_clips.py"
click node_qcreports "https://github.com/aryamaandash/guitar-style-classifier/tree/main/results/qc"
click node_trainer "https://github.com/aryamaandash/guitar-style-classifier/blob/main/src/train_baseline.py"
click node_evaluation "https://github.com/aryamaandash/guitar-style-classifier/tree/main/results/baseline"
click node_live "https://github.com/aryamaandash/guitar-style-classifier/blob/main/src/live_predict.py"
click node_livefeatures "https://github.com/aryamaandash/guitar-style-classifier/blob/main/src/train_baseline.py"
click node_prediction "https://github.com/aryamaandash/guitar-style-classifier/blob/main/src/live_predict.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_webpage,node_webdata,node_demo,node_demoprediction toneBlue
class node_sessions,node_splitter,node_clips,node_processed toneAmber
class node_qc,node_qcreports,node_trainer,node_model,node_evaluation toneMint
class node_live,node_livefeatures,node_prediction toneRose
class node_visitor,node_browseraudio,node_recordings,node_guitarist,node_audiointerface toneIndigo
```

## Components

### Website

- [Classifier site](https://github.com/aryamaandash/guitar-style-classifier/blob/main/app/page.tsx): `app/page.tsx`
- [Site model data](https://github.com/aryamaandash/guitar-style-classifier/blob/main/lib/model-data.ts): `lib/model-data.ts`
- [WAV demo](https://github.com/aryamaandash/guitar-style-classifier/blob/main/components/classifier-demo.tsx): `components/classifier-demo.tsx`
- [Demo prediction](https://github.com/aryamaandash/guitar-style-classifier/blob/main/components/classifier-demo.tsx): `components/classifier-demo.tsx`

### Audio preparation

- [Session metadata](https://github.com/aryamaandash/guitar-style-classifier/blob/main/data/metadata/sessions.csv): `data/metadata/sessions.csv`
- [Clip splitter](https://github.com/aryamaandash/guitar-style-classifier/blob/main/src/split_audio.py): `src/split_audio.py`
- [Clip metadata](https://github.com/aryamaandash/guitar-style-classifier/blob/main/data/metadata/clips.csv): `data/metadata/clips.csv`
- **One-second clips**

### Training and QC

- [Audio quality control](https://github.com/aryamaandash/guitar-style-classifier/blob/main/src/qc_audio_clips.py): `src/qc_audio_clips.py`
- [QC reports](https://github.com/aryamaandash/guitar-style-classifier/tree/main/results/qc): `results/qc`
- [Baseline training](https://github.com/aryamaandash/guitar-style-classifier/blob/main/src/train_baseline.py): `src/train_baseline.py`
- **Trained classifier**
- [Evaluation artifacts](https://github.com/aryamaandash/guitar-style-classifier/tree/main/results/baseline): `results/baseline`

### Recognition

- [Live recognition](https://github.com/aryamaandash/guitar-style-classifier/blob/main/src/live_predict.py): `src/live_predict.py`
- [Shared feature extraction](https://github.com/aryamaandash/guitar-style-classifier/blob/main/src/train_baseline.py): `src/train_baseline.py`
- [Smoothed prediction](https://github.com/aryamaandash/guitar-style-classifier/blob/main/src/live_predict.py): `src/live_predict.py`

### Other components

- **Website visitor**
- **Uploaded WAV**
- **Raw recordings**
- **Guitarist**
- **Audio input device**

## Connections

- Website visitor → Classifier site: opens
- Classifier site → Site model data: reads display data
- Classifier site → WAV demo: renders
- Website visitor → WAV demo: uploads WAV
- Uploaded WAV → WAV demo: decodes
- WAV demo → Demo prediction: classifies locally
- Demo prediction → Website visitor: shows probabilities
- Raw recordings → Clip splitter: reads WAV
- Session metadata → Clip splitter: selects recordings
- Clip splitter → One-second clips: writes clips
- Clip splitter → Clip metadata: writes metadata
- One-second clips → Audio quality control: scans clips
- Clip metadata → Audio quality control: reads metadata
- Audio quality control → QC reports: writes reports
- Clip metadata → Baseline training: loads clip records
- Session metadata → Baseline training: assigns splits
- One-second clips → Baseline training: loads audio
- Baseline training → Trained classifier: trains and saves
- Baseline training → Evaluation artifacts: writes metrics
- Classifier site → Evaluation artifacts: displays results
- Guitarist → Audio input device: plays guitar
- Audio input device → Live recognition: streams audio
- Live recognition → Shared feature extraction: requests features
- Shared feature extraction → Live recognition: returns feature vector
- Live recognition → Trained classifier: loads and predicts
- Live recognition → Smoothed prediction: smooths probabilities
- Smoothed prediction → Guitarist: prints label and confidence
