carsa_api / README.md
athmontech's picture
Force rebuild - fix runtime error
fa6b08f
metadata
title: Carsa AI - African Translation API
emoji: 🌍
colorFrom: blue
colorTo: green
sdk: docker
app_port: 7860
pinned: false
license: mit
short_description: African language translation API with TTS/STT
tags:
  - translation
  - speech-recognition
  - text-to-speech
  - african-languages
  - fastapi
  - whisper

🌍 Carsa AI - African Language Translation API

Hugging Face Spaces FastAPI Python

A comprehensive AI-powered API for African language translation, speech-to-text, and text-to-speech capabilities.

🎯 Features

  • πŸ”„ Translation: English ↔ 4 African languages (Twi, Ga, Ewe, Hausa)
  • 🎀 Speech-to-Text: Advanced ASR using Whisper
  • πŸ”Š Text-to-Speech: High-quality voice synthesis with 109+ voices
  • ⚑ Fast API: Optimized for mobile applications
  • 🌍 Global Access: Hosted on Hugging Face Spaces

πŸ“± Supported Languages

Language Code Region
Twi twi Ghana
Ga ga Ghana
Ewe ewe Ghana/Togo
Hausa hausa Nigeria/Niger

πŸš€ API Endpoints

Translation

POST /translate
Content-Type: application/json

{
  "text": "Hello, how are you?",
  "target_lang": "twi"
}

Speech-to-Text

POST /speech-to-text
Content-Type: multipart/form-data

audio_file: [WAV file]

Text-to-Speech

POST /text-to-speech
Content-Type: application/json

{
  "text": "Hello world"
}

πŸ₯ Health Check

GET /health

πŸ“– Interactive Documentation

Visit /docs for complete interactive API documentation.

πŸ› οΈ Technology Stack

  • FastAPI: Modern Python web framework
  • Transformers: Hugging Face model library
  • Whisper: OpenAI speech recognition
  • Coqui TTS: Text-to-speech synthesis
  • PyTorch: Deep learning framework

πŸ“Š Performance

  • Translation: ~200ms response time
  • Speech-to-Text: ~2-5 seconds processing
  • Text-to-Speech: ~1-3 seconds generation
  • Uptime: 99.9%+ on Hugging Face Spaces

πŸ“± Mobile Integration

Perfect for Flutter, React Native, or any mobile framework. Optimized for:

  • Low latency responses
  • Efficient data usage
  • Reliable connectivity
  • Global accessibility

Built with ❀️ for African language preservation and accessibility