# Amharic Text-to-Speech & Speech-to-Text (From Scratch)
A research-grade, fully open-source pipeline for training and serving **Amharic (አማርኛ)** speech AI models — built from scratch using PyTorch, no external APIs.
---
## Features
- 🧠 **ASR (Speech → Text):** Conformer + CTC decoder trained on Amharic audio
- 🔊 **TTS (Text → Speech):** Tacotron2 acoustic model + HiFi-GAN vocoder
- 📝 **Amharic G2P:** Custom Grapheme-to-Phoneme for all Ethiopic Unicode blocks
- 🎙️ **Recording Studio:** Built-in web UI to record & contribute your own voice data
- 📊 **Training Dashboard:** Live loss/WER visualizations in the browser
- 🚀 **Colab Notebooks:** Ready-to-run GPU training notebooks (free GPU)
---
## Project Structure
```
├── data/ # Datasets & processed data
│ ├── raw/ # Downloaded raw speech datasets
│ ├── processed/ # Preprocessed features (mel, tokens)
│ └── recordings/ # Your own recorded clips
├── src/
│ ├── data/ # G2P, preprocessing, PyTorch datasets
│ ├── models/
│ │ ├── asr/ # Conformer-CTC ASR model
│ │ └── tts/ # Tacotron2 + HiFi-GAN TTS model
│ ├── training/ # Training loops & metrics
│ └── inference/ # Inference scripts
├── notebooks/ # Google Colab training notebooks
├── checkpoints/ # Saved model weights
├── app/ # Flask web inference app
│ ├── server.py
│ ├── templates/
│ └── static/
├── requirements.txt
└── README.md
```
---
## Quick Start
### 1. Install Dependencies
```bash
python -m venv venv
venv\Scripts\activate # Windows
pip install -r requirements.txt
```
### 2. Download Datasets
```bash
python data/download_datasets.py --datasets fleurs common_voice alffa
```
### 3. Preprocess Data
```bash
# For ASR
python src/data/preprocess_asr.py --input data/raw --output data/processed/asr
# For TTS
python src/data/preprocess_tts.py --input data/raw --output d …