# aahanakabdugale/oscine architecture

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

- Interactive diagram: https://gitdiagram.com/aahanakabdugale/oscine
- Repository: https://github.com/aahanakabdugale/oscine

## Overview

Oscine is a contrastive speech-analysis product: a participant selects an orator baseline, submits a recording, and receives temporally localized delivery flaws, mathematical coaching explanations, rubric scores, and visual comparisons. The documented runtime stages are word alignment and acoustic feature extraction, contrastive detection, explanation/scoring, and dashboard presentation. The repository also includes curated ideal/flawed recordings and annotations. The README documents the processing pipeline; some API-to-frontend wiring and unsampled subsystem details are not established by the excerpts, so those links are omitted.

Main entry points: [`src/api.py`](https://github.com/aahanakabdugale/oscine/blob/main/src/api.py) (Analysis API), [`frontend/src/App.jsx`](https://github.com/aahanakabdugale/oscine/blob/main/frontend/src/App.jsx) (Analysis dashboard), [`src/features.py`](https://github.com/aahanakabdugale/oscine/blob/main/src/features.py) (Acoustic features), [`src/detect.py`](https://github.com/aahanakabdugale/oscine/blob/main/src/detect.py) (Flaw grounding)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Analysis experience"]
  node_dashboard["Analysis dashboard<br/>[App.jsx]"]
  node_app_entry["UI entry<br/>[main.jsx]"]
  node_analysis_api["Analysis API<br/>[api.py]"]
end

subgraph group_analysis["Speech analysis"]
  node_aligner["Word alignment<br/>[align.py]"]
  node_features["Acoustic features<br/>[features.py]"]
  node_detector["Flaw grounding<br/>[detect.py]"]
  node_explain_score["Explanation and rubric<br/>[explain.py]"]
end

subgraph group_reference["Reference corpus"]
  node_corpus[("Reference speech corpus")]
  node_annotations["Flaw annotations<br/>[labels.json]"]
end

node_speaker(("Participant"))

node_speaker -->|"submits recording"| node_dashboard
node_app_entry -->|"renders"| node_dashboard
node_dashboard -.->|"requests analysis"| node_analysis_api
node_analysis_api -->|"loads baseline"| node_corpus
node_analysis_api -->|"aligns words"| node_aligner
node_analysis_api -->|"extracts features"| node_features
node_analysis_api -->|"grounds flaws"| node_detector
node_features -->|"uses timestamps"| node_aligner
node_detector -->|"compares features"| node_features
node_analysis_api -->|"explains and scores"| node_explain_score
node_corpus -->|"includes labels"| node_annotations
node_analysis_api -->|"returns diagnostics"| node_dashboard

click node_dashboard "https://github.com/aahanakabdugale/oscine/blob/main/frontend/src/App.jsx"
click node_app_entry "https://github.com/aahanakabdugale/oscine/blob/main/frontend/src/main.jsx"
click node_analysis_api "https://github.com/aahanakabdugale/oscine/blob/main/src/api.py"
click node_aligner "https://github.com/aahanakabdugale/oscine/blob/main/src/align.py"
click node_features "https://github.com/aahanakabdugale/oscine/blob/main/src/features.py"
click node_detector "https://github.com/aahanakabdugale/oscine/blob/main/src/detect.py"
click node_explain_score "https://github.com/aahanakabdugale/oscine/blob/main/src/explain.py"
click node_corpus "https://github.com/aahanakabdugale/oscine/tree/main/dataset"
click node_annotations "https://github.com/aahanakabdugale/oscine/blob/main/dataset/labels.json"

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_dashboard,node_app_entry,node_analysis_api toneBlue
class node_aligner,node_features,node_detector,node_explain_score toneAmber
class node_corpus,node_annotations toneMint
class node_speaker toneIndigo
```

## Components

### Analysis experience

- [Analysis dashboard](https://github.com/aahanakabdugale/oscine/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [UI entry](https://github.com/aahanakabdugale/oscine/blob/main/frontend/src/main.jsx): `frontend/src/main.jsx`
- [Analysis API](https://github.com/aahanakabdugale/oscine/blob/main/src/api.py): `src/api.py`

### Speech analysis

- [Word alignment](https://github.com/aahanakabdugale/oscine/blob/main/src/align.py): `src/align.py`
- [Acoustic features](https://github.com/aahanakabdugale/oscine/blob/main/src/features.py): `src/features.py`
- [Flaw grounding](https://github.com/aahanakabdugale/oscine/blob/main/src/detect.py): `src/detect.py`
- [Explanation and rubric](https://github.com/aahanakabdugale/oscine/blob/main/src/explain.py): `src/explain.py`

### Reference corpus

- [Reference speech corpus](https://github.com/aahanakabdugale/oscine/tree/main/dataset): `dataset`
- [Flaw annotations](https://github.com/aahanakabdugale/oscine/blob/main/dataset/labels.json): `dataset/labels.json`

### Other components

- **Participant**

## Connections

- Participant → Analysis dashboard: submits recording (evidence: `README.md`)
- UI entry → Analysis dashboard: renders (evidence: `frontend/src/main.jsx`)
- Analysis dashboard → Analysis API: requests analysis
- Analysis API → Reference speech corpus: loads baseline (evidence: `src/api.py`)
- Analysis API → Word alignment: aligns words (evidence: `README.md`)
- Analysis API → Acoustic features: extracts features (evidence: `README.md`)
- Analysis API → Flaw grounding: grounds flaws (evidence: `src/api.py`)
- Acoustic features → Word alignment: uses timestamps (evidence: `src/features.py`)
- Flaw grounding → Acoustic features: compares features (evidence: `src/detect.py`)
- Analysis API → Explanation and rubric: explains and scores (evidence: `src/api.py`)
- Reference speech corpus → Flaw annotations: includes labels (evidence: `README.md`)
- Analysis API → Analysis dashboard: returns diagnostics (evidence: `README.md`)
