NaijaTalk is a real-time speech-to-speech translation app for Nigeria's major languages: English, Yoruba, Hausa, and Igbo. Simply speak in one language, and NaijaTalk instantly translates and speaks back in your target language with authentic Nigerian accents. Breaking language barriers across Nigeria.
# NaijaTalk
NaijaTalk is a real-time speech translation app for Nigerian languages. It combines a Flutter client with a FastAPI backend that transcribes speech, translates the recognized text, and returns synthesized speech over a WebSocket connection.
## Features
- Speech-to-text for English, Yoruba, Hausa, and Igbo
- Text translation between supported languages
- Text-to-speech playback for translated output
- Flutter frontend for web, mobile, and desktop targets
- FastAPI backend with REST health endpoints and WebSocket translation flow
- Provider-selectable TTS support for YarnGPT, Google Cloud TTS, and Abena TTS
## Project Structure
```text
NaijaTalk/
├── backend/ # FastAPI backend
│ ├── app/
│ │ ├── main.py # API routes and WebSocket endpoint
│ │ ├── models/ # ASR, translation, and TTS adapters
│ │ ├── services/ # Audio processing pipeline
│ │ └── websocket_manager.py
│ ├── requirements.txt
│ └── run.py
├── frontend/
│ └── naijatalk_app/ # Flutter application
├── third_party/
│ └── yarngpt/ # YarnGPT submodule
├── docker-compose.yml
└── README.md
```
## Supported Languages
| Code | Language |
| --- | --- |
| `en` | English |
| `yo` | Yoruba |
| `ha` | Hausa |
| `ig` | Igbo |
## How It Works
1. The Flutter app records microphone audio.
2. Audio is encoded as base64 and sent to the backend WebSocket endpoint.
3. The backend converts audio to WAV using `pydub`.
4. ASR transcribes the audio with NCAIR language models.
5. Translation runs through `deep-translator` with fallback behavior.
6. TTS generates translated speech using the selected provider.
7. The backend sends translated text first, then generated audio.
## Prerequisites
- Python 3.11 recommended
- Flutter SDK 3.x
- Git
- FFmpeg, required by `pydub`
- A GitHub clone with submodules enabled
Install FFmpeg on macOS:
```bash
brew install ffmpeg
```
## Clone
Because YarnGPT is tracked as a submodule, clo …