Real-time speech transcription and multilingual translation API supporting African and international languages. Built with OpenAI Whisper, Helsinki-NLP MarianMT, FastAPI, and Docker. Zero cloud cost — fully local inference.
# 🎙️ Multilingual Speech Translation API
> Real-time speech transcription and translation pipeline supporting African and international languages — built with OpenAI Whisper, Helsinki-NLP, and FastAPI.
---
## 📌 Overview
This project provides a fully containerised, production-ready pipeline that:
1. **Accepts audio input** in any common format (`.wav`, `.mp3`, `.m4a`, `.ogg`, `.flac`)
2. **Transcribes speech to text** using OpenAI Whisper running entirely locally — no API key required
3. **Translates the transcript** using Helsinki-NLP MarianMT models via HuggingFace Transformers
4. **Returns structured JSON** with the transcript, detected language, and translation
5. **Exposes a Streamlit UI** for non-technical users to upload audio and view results instantly
The architecture mirrors real-world multilingual conferencing and communication platforms, with specific support for **African languages** (Yoruba, Swahili) alongside French, Spanish, German, and English.
> **Zero cloud cost.** All inference runs locally. No OpenAI API key, no Google Cloud billing, no hidden charges.
---
## 🏗️ Architecture
```
┌─────────────────────────────────────────────────────────────┐
│ Docker Network │
│ │
│ ┌──────────────┐ POST /transcribe ┌───────────────┐ │
│ │ Streamlit │ ──────────────────────▶│ FastAPI │ │
│ │ Frontend │ │ Backend │ │
│ │ :8501 │ ◀──────────────────────│ :8000 │ │
│ └──────────────┘ JSON response └──────┬────────┘ │
│ │ │
│ ┌────────────▼─────────┐ │
│ │ OpenAI Whisper │ │
│ │ (Speech → Text) │ │
│ └────────────┬─────────┘ │
│ …