akki2825's picture
Upload 7 files
7cc1bbc verified
|
Raw
History Blame Contribute Delete
1.87 kB
---
title: Language Attrition - derive & model
emoji: πŸ“Š
colorFrom: indigo
colorTo: pink
sdk: gradio
sdk_version: 4.44.1
python_version: "3.10"
app_file: app.py
pinned: false
license: mit
---
# Language Attrition: derive the numbers, then model them
A point-and-click tool for the *Bye-lingual* seminar. No transcribing, no
Spanish, no Praat, no code. Runs on CPU (it does **not** transcribe audio).
**Tab 1 - Derive.** Upload a recording **and its transcript** (the existing
word-timestamped `.json`). The app derives ~25 linguistic factors: disfluency
(filled / empty pauses, repetitions, retractions), fluency (speech /
articulation rate, phonation %), complexity (MLU, TTR, MTLD), and acoustics (F0,
jitter, shimmer, HNR, spectral tilt, MFCCs). Stack several speakers and download
the table.
**Tab 2 - Model.** Use the table you built (or upload a CSV joined with your
questionnaire predictors), pick two variables, and get the scatter, the
correlation (Pearson or Spearman), and the regression line. A correlation
heatmap shows all variables at once.
The numbers are identical to the course pipeline (same `markers.py` /
`acoustic_markers.py`). Transcription is **not** done here: this Space consumes an
existing transcript. Phase-2 markers (VOT, vowel space, rhythm) need forced
alignment (MFA) and are not produced.
## Transcript format
A JSON file, either a bare list or `{"chunks": [...]}`, where each chunk is:
```json
{"text": "Pues", "timestamp": {"start": 2.94, "end": 3.08}}
```
The `[*]` disfluency markers must be kept. Per-speaker transcripts can be
exported from the pipeline with `pipeline/export_transcripts_json.py`.
## Files
- `app.py` - Gradio UI (Derive + Model tabs)
- `features.py` - parse transcript β†’ extract_markers β†’ flat feature row
- `markers.py`, `acoustic_markers.py`, `alignment_markers.py` - vendored from `pipeline/`