ReadingCoach / README.md
NLPV's picture
Upload 7 files
4eab58f verified
|
Raw
History Blame Contribute Delete
1.72 kB
---
title: Reading & Pronunciation Coach
emoji: 🗣️
colorFrom: indigo
colorTo: green
sdk: gradio
app_file: app.py
pinned: false
short_description: Hindi & English reading practice with pronunciation scoring
---
# Reading & Pronunciation Coach
Read a passage aloud in Hindi or English and get a word-level error breakdown:
WER, CER, strict and lenient accuracy, speaking rate, and pause count.
## Configuration
Set these under **Settings → Variables and secrets**.
| Name | Type | Value |
|---|---|---|
| `ASR_BACKEND` | Variable | `groq` \| `zerogpu` \| `local` \| `auto` |
| `GROQ_API_KEY` | **Secret** | required for the `groq` backend |
| `GROQ_MODEL_HI` | Variable | default `whisper-large-v3` |
| `GROQ_MODEL_EN` | Variable | default `whisper-large-v3-turbo` |
| `LOCAL_TIER` | Variable | `fast` \| `balanced` \| `accurate` (local only) |
## Choosing a backend
**`groq` on free CPU hardware** — recommended. Only transcription needs a GPU,
and Groq rents it per second of audio. Uncomment nothing in `requirements.txt`.
Trade-off: no per-word confidence, so the "Unclear words" metric is hidden.
**`zerogpu`** — free GPU, `transformers` path. Uncomment the ZeroGPU block in
`requirements.txt` and select ZeroGPU hardware. Note that `faster-whisper` will
*not* work here: CTranslate2 does not allocate through PyTorch's CUDA allocator,
so it cannot see a ZeroGPU-assigned device.
**`local`** — your machine or paid GPU Spaces hardware. The only backend that
reports per-word ASR confidence, which is a useful mumbling signal. Uncomment
the `faster-whisper` line.
## Local development
```bash
pip install -r requirements.txt faster-whisper
ASR_BACKEND=local LOCAL_TIER=fast python app.py
```