Ip25 is a modern web application designed to bridge language barriers by providing seamless translation services for Nigeria's indigenous languages. Built with a React frontend and FastAPI backend, it offers real-time translation with voice support for Hausa, Yoruba, Igbo, and other Nigerian languages.
Ip25 is a comprehensive translation platform that enables:
- Real-time text translation between English and Nigerian indigenous languages
- Voice-to-text conversion using OpenAI Whisper for speech input
- Text-to-speech output for audio feedback
- Modern web interface built with React and Tailwind CSS
- RESTful API for integration with other applications
- Supabase integration for data management and authentication
- π€ Voice Input: Record audio and convert to text for translation using OpenAI Whisper
- π Advanced TTS: Multiple TTS engines including Coqui TTS and Google TTS
- π Multi-language Support: Supports Hausa, Yoruba, Igbo, Edo/Bini languages
- π± Responsive Design: Works seamlessly on desktop and mobile devices
- π API Integration: RESTful API for developers to integrate translation services
- π¨ Modern UI: Clean, intuitive interface built with shadcn/ui components
- πΉ Multimedia Processing: Extract training data from videos, music, and documents
- π Advanced Data Processing: Sophisticated CSV/Excel parsing for training data
- π€ Auto-Learning: Automatic model improvement from user feedback and corrections
- π Real Model Training: Actual fine-tuning instead of simulation
- React 18 with TypeScript
- Vite for fast development and building
- Tailwind CSS for styling
- shadcn/ui for UI components
- React Router for navigation
- Supabase for backend services
- FastAPI for the REST API
- OpenAI Whisper for speech-to-text
- Transformers for translation models
- PyTorch for machine learning inference
- Uvicorn as ASGI server
- Docker Desktop (4.40.0 or higher) - Recommended
- Node.js (v18 or higher) - For local development
- Python (v3.10 or higher) - For local development
- Git
git clone https://github.com/Ip-Tec/ip25.git
cd ip25# Make the management script executable (Linux/macOS)
chmod +x docker-manage.sh
# Start all services
./docker-manage.sh start
# Or use docker-compose directly
docker-compose up --build -d- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
- API Documentation: http://localhost:8000/docs
# View service status
./docker-manage.sh status
# View logs
./docker-manage.sh logs
./docker-manage.sh logs backend # Backend only
./docker-manage.sh logs frontend # Frontend only
# Restart services
./docker-manage.sh restart
# Stop services
./docker-manage.sh stop
# Clean up (removes all containers and images)
./docker-manage.sh clean# Navigate to backend directory
cd backend
# Create virtual environment
python -m venv venv
# Activate virtual environment
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activate
# Install Python dependencies
pip install -r requirements.txt
# Set up environment variables
cp env.example .env
# Edit .env with your configuration
# Run the backend server
uvicorn main:app --reload --host 0.0.0.0 --port 8000# Navigate to frontend directory (from project root)
cd frontend
# Install Node.js dependencies
npm install
# Set up environment variables
cp .env.example .env.local
# Edit .env.local with your backend URL
# Start the development server
npm run dev- Frontend: http://localhost:5173
- Backend API: http://localhost:8000
- API Documentation: http://localhost:8000/docs
ip25/
βββ π backend/ # FastAPI backend
β βββ π routers/ # API route handlers
β β βββ translate.py # Translation endpoints
β βββ π services/ # Business logic
β β βββ ai_models.py # AI model services
β βββ π utils/ # Utility functions
β β βββ auth.py # Authentication helpers
β β βββ file_helpers.py # File processing utilities
β βββ π train/ # Model training scripts
β β βββ train_whisper.py # Whisper model training
β βββ main.py # FastAPI application entry point
β βββ requirements.txt # Python dependencies
β βββ utils_audio.py # Audio processing utilities
β
βββ π frontend/ # React frontend
β βββ π src/
β β βββ π components/ # React components
β β β βββ π ui/ # Reusable UI components
β β β βββ Navigation.tsx # Main navigation
β β βββ π pages/ # Page components
β β β βββ Index.tsx # Home page
β β β βββ Translate.tsx # Translation interface
β β β βββ Api.tsx # API documentation
β β β βββ Admin.tsx # Admin panel
β β βββ π hooks/ # Custom React hooks
β β βββ π integrations/ # External service integrations
β β β βββ π supabase/ # Supabase client setup
β β βββ π lib/ # Utility functions
β βββ π supabase/ # Supabase configuration
β β βββ π functions/ # Edge functions
β β βββ π migrations/ # Database migrations
β βββ package.json # Node.js dependencies
β βββ vite.config.ts # Vite configuration
β
βββ π config.yaml # Hugging Face Spaces configuration
βββ π requirements.txt # Root Python dependencies
βββ π LICENSE # MIT License
βββ π CODE_OF_CONDUCT.md # Community guidelines
βββ π CONTRIBUTING.md # Contribution guidelines
βββ π legal_&_confidentiality.md # Legal disclaimers
- Clone and setup the project as described above
- Start the backend server on port 8000
- Start the frontend development server on port 5173
- Open your browser to http://localhost:5173
- Try translating some English text to Hausa!
HOST=0.0.0.0
PORT=8000
WHISPER_MODEL=small
ALLOWED_ORIGINS=http://localhost:5173,http://127.0.0.1:5173VITE_BACKEND_URL=http://localhost:8000
VITE_SUPABASE_URL=your_supabase_url
VITE_SUPABASE_ANON_KEY=your_supabase_anon_keyThe backend provides a comprehensive RESTful API with the following endpoints:
POST /translate/- Translate text between languagesPOST /stt/- Speech-to-text conversionPOST /tts/- Text-to-speech generationPOST /pipeline/- Complete audio-to-audio pipeline
GET /languages/- Get supported languagesPOST /detect-language/- Detect language of input text
GET /tts/engines/- Get available TTS engines and voices
POST /process-multimedia/- Process videos, music, documents for training data
POST /feedback/translation/- Submit translation feedbackPOST /feedback/tts/- Submit TTS feedbackPOST /feedback/correction/- Submit user correctionsGET /feedback/summary/- Get feedback summaryPOST /feedback/export-training-data/- Export training data from feedback
POST /train/- Train models with uploaded dataGET /feedback/should-retrain/- Check if model should be retrained
GET /- Health check endpoint
Visit http://localhost:8000/docs for interactive API documentation.
We welcome contributions! Please see our Contributing Guide for details on:
- Setting up the development environment
- Code style and conventions
- Submitting pull requests
- Reporting issues
This project is licensed under the MIT License. See the LICENSE file for details.
- π§ Email: Otakhor Peter
- π Issues: GitHub Issues
- π¬ Discussions: GitHub Discussions
Built with β€οΈ for Nigeria's linguistic diversity