The EchoVoiice API provides high-quality text-to-speech synthesis for the African languages using Coqui TTS with a pre-trained model. This API is designed for mobile applications and web services that need to add speech synthesis capabilities for African Languages.
# EchoVoiice
A production-ready FastAPI-based Text-to-Speech API for African languages, starting with Ewe. Solving the problem where Google Translate can translate Ewe but cannot speak it.
## 🌟 Features
- **High-Quality TTS**: Uses Coqui TTS with pre-trained Ewe model (`tts_models/ewe/openbible/vits`)
- **Mobile-Optimized**: Streaming audio responses and multiple formats (WAV, MP3)
- **Production-Ready**: Docker containerization, authentication, rate limiting, and monitoring
- **Comprehensive API**: RESTful endpoints with OpenAPI documentation
- **Ewe Language Support**: Validation and pre-loaded common phrases
- **Performance**: Intelligent caching and batch processing
- **Security**: Bearer token authentication, CORS, and input validation
## 🚀 Quick Start
### Prerequisites
- Docker and Docker Compose
- 2GB+ RAM (for TTS model)
- Linux/macOS/Windows with WSL2
### Installation
1. **Clone and setup:**
```bash
git clone
cd echovoiice
./scripts/setup.sh
```
2. **Configure environment:**
```bash
cp .env.example .env
# Edit .env with your settings
```
3. **Start the API:**
```bash
docker-compose up -d
```
4. **Test the API:**
```bash
curl
localhost
python scripts/test_api.py
```
5. **View documentation:**
Open
localhost in your browser
## đź“‹ API Endpoints
### Core TTS Endpoints
#### Generate TTS Audio
```http
POST /api/v1/tts/generate
Authorization: Bearer your-api-key
Content-Type: application/json
{
"text": "Akpe na wò",
"format": "wav",
"speed": 1.0
}
```
#### Batch Generation
```http
POST /api/v1/tts/batch
Authorization: Bearer your-api-key
{
"texts": ["Nyuie na mi", "Aleke nèle?"],
"format": "mp3",
"speed": 1.0
}
```
#### Download Audio
```http
GET /api/v1/audio/{audio_id}
```
#### Stream Audio (Mobile Optimized)
```http
GET /api/v1/stream/{audio_id}
```
### Utility Endpoints
#### Get Ewe Phrases
```http
GET /api/v1/phrases
```
#### Health Check
```http
GET /health
```
#### API Documentation
```http
GET /doc …