# sanjaykishore18/agentslp_speech_pathologist architecture

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

- Interactive diagram: https://gitdiagram.com/sanjaykishore18/agentslp_speech_pathologist
- Repository: https://github.com/sanjaykishore18/agentslp_speech_pathologist

## Overview

AgentSLP is a research repository for training and evaluating two separate multi-label speech classifiers: a broad-problem model using text-derived and acoustic features, and SEP-28k stuttering-event models using annotated speech clips. The SEP workflow prepares clips from episode metadata and source audio, then trains and evaluates model variants; the repository also retains prior training scripts and generated model artifacts. The README documents the principal workflows, while sampled excerpts show preprocessing, model components, and evaluation details. Some artifact-writing and wiring details are unsampled, so those relationships are omitted or marked unverified.

Main entry points: [`data/SEP-28k_labels.csv`](https://github.com/sanjaykishore18/agentslp_speech_pathologist/blob/master/data/SEP-28k_labels.csv) (SEP labels), [`prepare_sep28k.py`](https://github.com/sanjaykishore18/agentslp_speech_pathologist/blob/master/prepare_sep28k.py) (Clip preparation), [`train_20k_model.py`](https://github.com/sanjaykishore18/agentslp_speech_pathologist/blob/master/train_20k_model.py) (20K classifier), [`train_sep28k_final_v3.py`](https://github.com/sanjaykishore18/agentslp_speech_pathologist/blob/master/train_sep28k_final_v3.py) (SEP v3 model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inputs["Data inputs"]
  node_broad_data["Broad features"]
  node_sep_labels["SEP labels<br/>[SEP-28k_labels.csv]"]
  node_sep_episodes["Episode metadata"]
end

subgraph group_prep["SEP preparation"]
  node_prepare["Clip preparation<br/>[prepare_sep28k.py]"]
  node_clip_corpus["SEP clip corpus"]
end

subgraph group_models["Model training"]
  node_model_20k["20K classifier<br/>[train_20k_model.py]"]
  node_sep_original["SEP classifier"]
  node_sep_v3["SEP v3 model"]
  node_sep_wavlm["SEP WavLM model"]
  node_sep_backup["Prior SEP model"]
  node_sep_backup_corrected["Prior corrected model"]
end

subgraph group_results["Model artifacts"]
  node_broad_artifacts["20K artifacts"]
  node_sep_artifacts["SEP artifacts"]
  node_wavlm_artifacts["WavLM artifacts"]
end

node_researcher(("Researcher"))
node_episode_host["Episode source"]

node_researcher -->|"runs training"| node_model_20k
node_researcher -->|"prepares audio"| node_prepare
node_researcher -->|"runs training"| node_sep_original
node_broad_data -.->|"provides features"| node_model_20k
node_sep_labels -->|"provides annotations"| node_prepare
node_sep_episodes -->|"maps episode URLs"| node_prepare
node_prepare -->|"downloads episodes"| node_episode_host
node_prepare -->|"writes clips"| node_clip_corpus
node_sep_labels -->|"provides labels"| node_sep_original
node_clip_corpus -->|"provides audio"| node_sep_original
node_sep_labels -->|"provides labels"| node_sep_v3
node_clip_corpus -->|"provides clips"| node_sep_v3
node_sep_labels -->|"provides labels"| node_sep_wavlm
node_clip_corpus -->|"provides clips"| node_sep_wavlm
node_sep_labels -->|"provides labels"| node_sep_backup
node_clip_corpus -->|"provides clips"| node_sep_backup
node_sep_labels -->|"provides labels"| node_sep_backup_corrected
node_clip_corpus -->|"provides clips"| node_sep_backup_corrected
node_model_20k -.->|"saves results"| node_broad_artifacts
node_sep_v3 -.->|"saves results"| node_sep_artifacts
node_sep_wavlm -.->|"saves results"| node_wavlm_artifacts

click node_sep_labels "https://github.com/sanjaykishore18/agentslp_speech_pathologist/blob/master/data/SEP-28k_labels.csv"
click node_sep_episodes "https://github.com/sanjaykishore18/agentslp_speech_pathologist/blob/master/data/SEP-28k_episodes.csv"
click node_prepare "https://github.com/sanjaykishore18/agentslp_speech_pathologist/blob/master/prepare_sep28k.py"
click node_model_20k "https://github.com/sanjaykishore18/agentslp_speech_pathologist/blob/master/train_20k_model.py"
click node_sep_original "https://github.com/sanjaykishore18/agentslp_speech_pathologist/blob/master/train_sep28k_model.py"
click node_sep_v3 "https://github.com/sanjaykishore18/agentslp_speech_pathologist/blob/master/train_sep28k_final_v3.py"
click node_sep_wavlm "https://github.com/sanjaykishore18/agentslp_speech_pathologist/blob/master/train_sep28k_wavlm_final.py"
click node_sep_backup "https://github.com/sanjaykishore18/agentslp_speech_pathologist/blob/master/backups/sep28k_model_previous_2026-09-24/train_sep28k_model.py"
click node_sep_backup_corrected "https://github.com/sanjaykishore18/agentslp_speech_pathologist/blob/master/backups/sep28k_model_previous_2026-09-24/train_sep28k_model_final_corrected.py"
click node_broad_artifacts "https://github.com/sanjaykishore18/agentslp_speech_pathologist/tree/master/artifacts_20k"
click node_sep_artifacts "https://github.com/sanjaykishore18/agentslp_speech_pathologist/tree/master/artifacts_sep28k_final_v3"
click node_wavlm_artifacts "https://github.com/sanjaykishore18/agentslp_speech_pathologist/tree/master/artifacts_sep28k_wavlm_final"

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_broad_data,node_sep_labels,node_sep_episodes toneBlue
class node_prepare,node_clip_corpus toneAmber
class node_model_20k,node_sep_original,node_sep_v3,node_sep_wavlm,node_sep_backup,node_sep_backup_corrected toneMint
class node_broad_artifacts,node_sep_artifacts,node_wavlm_artifacts toneRose
class node_researcher,node_episode_host toneIndigo
```

## Components

### Data inputs

- **Broad features**
- [SEP labels](https://github.com/sanjaykishore18/agentslp_speech_pathologist/blob/master/data/SEP-28k_labels.csv): `data/SEP-28k_labels.csv`
- [Episode metadata](https://github.com/sanjaykishore18/agentslp_speech_pathologist/blob/master/data/SEP-28k_episodes.csv): `data/SEP-28k_episodes.csv`

### SEP preparation

- [Clip preparation](https://github.com/sanjaykishore18/agentslp_speech_pathologist/blob/master/prepare_sep28k.py): `prepare_sep28k.py`
- **SEP clip corpus**

### Model training

- [20K classifier](https://github.com/sanjaykishore18/agentslp_speech_pathologist/blob/master/train_20k_model.py): `train_20k_model.py`
- [SEP classifier](https://github.com/sanjaykishore18/agentslp_speech_pathologist/blob/master/train_sep28k_model.py): `train_sep28k_model.py`
- [SEP v3 model](https://github.com/sanjaykishore18/agentslp_speech_pathologist/blob/master/train_sep28k_final_v3.py): `train_sep28k_final_v3.py`
- [SEP WavLM model](https://github.com/sanjaykishore18/agentslp_speech_pathologist/blob/master/train_sep28k_wavlm_final.py): `train_sep28k_wavlm_final.py`
- [Prior SEP model](https://github.com/sanjaykishore18/agentslp_speech_pathologist/blob/master/backups/sep28k_model_previous_2026-09-24/train_sep28k_model.py): `backups/sep28k_model_previous_2026-09-24/train_sep28k_model.py`
- [Prior corrected model](https://github.com/sanjaykishore18/agentslp_speech_pathologist/blob/master/backups/sep28k_model_previous_2026-09-24/train_sep28k_model_final_corrected.py): `backups/sep28k_model_previous_2026-09-24/train_sep28k_model_final_corrected.py`

### Model artifacts

- [20K artifacts](https://github.com/sanjaykishore18/agentslp_speech_pathologist/tree/master/artifacts_20k): `artifacts_20k`
- [SEP artifacts](https://github.com/sanjaykishore18/agentslp_speech_pathologist/tree/master/artifacts_sep28k_final_v3): `artifacts_sep28k_final_v3`
- [WavLM artifacts](https://github.com/sanjaykishore18/agentslp_speech_pathologist/tree/master/artifacts_sep28k_wavlm_final): `artifacts_sep28k_wavlm_final`

### Other components

- **Researcher**
- **Episode source**

## Connections

- Researcher → 20K classifier: runs training (evidence: `README.md`)
- Researcher → Clip preparation: prepares audio (evidence: `README.md`)
- Researcher → SEP classifier: runs training (evidence: `README.md`)
- Broad features → 20K classifier: provides features (evidence: `README.md`)
- SEP labels → Clip preparation: provides annotations (evidence: `prepare_sep28k.py`)
- Episode metadata → Clip preparation: maps episode URLs (evidence: `prepare_sep28k.py`)
- Clip preparation → Episode source: downloads episodes (evidence: `prepare_sep28k.py`)
- Clip preparation → SEP clip corpus: writes clips (evidence: `prepare_sep28k.py`)
- SEP labels → SEP classifier: provides labels (evidence: `README.md`)
- SEP clip corpus → SEP classifier: provides audio (evidence: `README.md`)
- SEP labels → SEP v3 model: provides labels (evidence: `train_sep28k_final_v3.py`)
- SEP clip corpus → SEP v3 model: provides clips (evidence: `train_sep28k_final_v3.py`)
- SEP labels → SEP WavLM model: provides labels (evidence: `train_sep28k_wavlm_final.py`)
- SEP clip corpus → SEP WavLM model: provides clips (evidence: `train_sep28k_wavlm_final.py`)
- SEP labels → Prior SEP model: provides labels (evidence: `backups/sep28k_model_previous_2026-09-24/train_sep28k_model.py`)
- SEP clip corpus → Prior SEP model: provides clips (evidence: `backups/sep28k_model_previous_2026-09-24/train_sep28k_model.py`)
- SEP labels → Prior corrected model: provides labels (evidence: `backups/sep28k_model_previous_2026-09-24/train_sep28k_model_final_corrected.py`)
- SEP clip corpus → Prior corrected model: provides clips (evidence: `backups/sep28k_model_previous_2026-09-24/train_sep28k_model_final_corrected.py`)
- 20K classifier → 20K artifacts: saves results
- SEP v3 model → SEP artifacts: saves results
- SEP WavLM model → WavLM artifacts: saves results
