File size: 3,407 Bytes
0978d28
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
---
title: Uzbek STT
emoji: πŸŽ™οΈ
colorFrom: green
colorTo: indigo
sdk: docker
app_port: 7860
pinned: false
license: apache-2.0
---

# Uzbek Speech-to-Text β€” a deployable service

An end-to-end Uzbek speech-to-text **service**: a documented REST API, a demo UI, and an
honest multi-engine benchmark β€” deployed to a live public URL on a **$0 budget** (no paid
server, no paid API, no GPU). Built to demonstrate shipping and operating software, not just
writing it.

> **Live demo:** _coming with the M1 deploy_ β†’ `https://huggingface.co/spaces/bintuulugbek/Uzbek-STT`
> **API docs:** `/docs` on the same URL.

---

## Why this project

Uzbek is an underserved language for speech tech. This project takes verified open Uzbek ASR
models and wraps them in production-grade engineering: a clean FastAPI service, a swappable
engine seam, problem+json errors, and a reproducible benchmark with real WER/CER numbers
measured by us (not quoted from model cards).

## Architecture

```mermaid
flowchart TD
    U[User: mic / upload / API call] -->|audio| FE[Gradio UI '/']
    U -->|POST audio| API[FastAPI '/api/*']
    FE --> SVC[TranscriptionService]
    API --> SVC
    SVC --> SEAM[Engine seam - Protocol]
    SEAM --> E1[whisper-small-uz  FAST]
    SEAM --> E2[rubaistt_v2_medium  ACCURATE]
    API --> DOCS[OpenAPI '/docs']
    subgraph Offline [Benchmark - offline]
        BM[harness] --> SEAM
        BM --> E3[xls-r-uzbek  benchmark-only]
        BM --> M[(metrics.csv + plots)]
    end
    subgraph Deploy [HF Spaces - Docker SDK - FREE]
        API
        FE
        DOCS
    end
```

## The $0 stack

| Need | Free tool |
|---|---|
| API + demo hosting | Hugging Face Spaces (Docker SDK, free CPU, 16 GB) |
| Models | Hugging Face Hub (Apache-2.0 Uzbek ASR) |
| Benchmark data | FLEURS `uz_uz` test split |
| Code | GitHub |

## Engines

| Role | Model | Deployed |
|---|---|---|
| Fast (default) | `BlueRaccoon/whisper-small-uz` | βœ… |
| Accurate | `islomov/rubaistt_v2_medium` | βœ… |
| Benchmark baseline | `lucio/xls-r-uzbek-cv8` | offline only |

## API

| Endpoint | Purpose |
|---|---|
| `GET /api/health` | readiness (engines loaded) |
| `POST /api/transcribe` | transcribe audio β†’ text + word timings |
| `GET /api/examples` | bundled FLEURS clips |
| `POST /api/transcribe_example` | transcribe a bundled clip + live WER |
| `GET /api/benchmark` | latest WER/CER per engine |

Errors follow **RFC 9457** (`application/problem+json`). All times are integer milliseconds.

### Why there's no login

Deliberate: this is a public evaluation demo with no user data to protect. Auth would only
add friction. Abuse is bounded by per-IP rate limiting + upload-size and duration caps instead.

## Roadmap

- [x] **M1** β€” deployable skeleton: live `/health` + `/docs` on HF Spaces
- [ ] **M2** β€” fast engine wired: real Uzbek transcription via `/api/transcribe`
- [ ] **M3** β€” Gradio UI (4 tabs) + one-click FLEURS examples with live WER
- [ ] **M4** β€” 3-engine benchmark on FLEURS + error dashboard
- [ ] **M5** β€” docs polish
- [ ] **v2** β€” long-audio chunking

## Local development

```bash
pip install -e ".[dev]"
uvicorn app.main:app --reload --port 7860
# open http://localhost:7860/docs
```

## License

Apache-2.0. All deployed models are Apache-2.0. This is original work; it follows common
FastAPI architectural conventions but contains no third-party application code.