Logo Lanfrica

Scovia-Barigye/Sunflower-Translator

Domain:

natural language processing

Record type:

software
Creator:
Sco
Host:
The All-in-One Local Uganda AI Hub # Sunflower: Uganda Connect 🌻 **The All-in-One Local Uganda AI Hub** A Streamlit web application powered by **Sunbird AI** that translates English into several Ugandan languages (Luganda, Runyankole, Ateso, Luo, Lugbara, Lusoga). The app supports multi-modal inputs including text, document uploads, and even features native in-browser voice recording and playback! ## Features - πŸ“ **Text Translation**: Translate raw English text directly. - πŸ“„ **Document Extraction**: Upload `.txt`, `.pdf`, or `.docx` files, and the app will extract the text for translation. - 🎀 **Voice Translation**: Natively record your voice from the browser, or upload `.mp3`/`.wav` files. The app uses Sunbird's Speech-to-Text (STT) API to transcribe the audio into English before translating it. - 🎧 **Audio Playback**: Automatically generates spoken audio of the translated local language phrases utilizing Sunbird's Text-to-Speech (TTS) API so you can listen to the translation immediately. - 🎨 **Beautiful UI**: Modern, tailor-made UI featuring Tailwind CSS styling, FontAwesome icons, outfit fonts, and a vibrant theme. ## Prerequisites - Python 3.8+ - A developer API key from Sunbird AI. ## Installation 1. **Clone the repository** (or download the files): ```bash git clone cd Sunflower-Translator ``` 2. **Create a Virtual Environment** (Recommended): ```bash python -m venv venv ``` 3. **Activate the Virtual Environment**: - On Windows: ```bash .\venv\Scripts\activate ``` - On macOS/Linux: ```bash source venv/bin/activate ``` 4. **Install Dependencies**: ```bash pip install -r requirements.txt ``` *(Note: This project requires `streamlit>=1.39.0` to support the native `st.audio_input` widget).* ## Running the Application Once your virtual environment is active and dependencies are installed, you can start the application by running: ```bash streamlit run app.py ``` The app will compile and automatically open in your default web browser (usually accessible at `localhost`). ## H …