Ghana language + voice bridge — Twi, Ewe, Ga, Dagbani. Speech API, i18n packs, and ML notebooks for fine-tuning Whisper/Gemma.
# Ghana Speech Bridge
> Voice-native language infrastructure for Ghanaian applications.
> Supports Twi, Ewe, Ga, Dagbani, Fante — with code-switching and offline-first design.
---
## What This Is
A standalone service + ML workspace that gives any app voice and language capabilities
for Ghanaian users — especially those without formal education who need to speak and
hear in their native tongue.
**Two parallel tracks:**
| Track | What | Timeline |
|-------|------|----------|
| **Short-term** | API-powered bridge (Khaya AI) with smart caching + call budget | Now |
| **Long-term** | Own every layer: fine-tuned Whisper ASR, Gemma 2B translation, Coqui TTS | Ongoing |
The service interface stays constant — backend providers swap underneath.
Every app built on this bridge gets improvements automatically.
---
## Architecture
```
User speaks (Twi / Ewe / Ga / Dagbani / mixed)
│
▼
[1] Language Detector → fast classifier, runs locally
│
▼
[2] ASR /api/stt → Khaya STT (now) → Whisper-Akan (soon)
│ "Me pɛ sɛ me kɔ fie"
▼
[3] Translate /api/translate → Khaya API (now) → Gemma 2B fine-tuned (soon)
│ "I want to go home"
▼
[4] LLM Reasoning → Claude / Gemini (always English, always cloud)
│ "Here are 3 bus routes..."
▼
[5] Translate back → same as step 3
│
▼
[6] TTS /api/tts → Khaya TTS (now) → Coqui XTTS (soon)
│
▼
User hears response in their language
```
---
## Repo Structure
```
ghana-speech-bridge/
├── apps/
│ └── speech-bridge/ # Next.js API service — deploy to Vercel
│ ├── app/api/
│ │ ├── stt/ # Speech → Text
│ │ ├── tts/ # Text → Speech (returns audio URL)
│ │ ├── translate/ # Text translation
│ │ ├── detect/ # Language detection
│ │ └── budget/ # API call usage dashboard
│ └── lib/
│ ├── providers/
│ │ └── khaya.ts # Khaya AI client
│ ├── router.ts …