Logo Lanfrica

chillyreward/gikuyu-translate

Domain:

natural language processing

Record type:

software
Creator:
chi
Host:
# Kikuyu Text-to-Speech App A Next.js application that translates English or Kiswahili text to Kikuyu (Gikuyu) and speaks it aloud. Features multiple AI-powered pipelines for translation and speech synthesis. ## Features ### 🎙️ Multiple Input Methods - **Text Input**: Type or paste text directly - **Speech-to-Text**: Record audio using Whisper API or browser speech recognition - **YouTube Pipeline**: Process YouTube videos (download → transcribe → translate → speak) ### 🔄 Translation - Gemini API for AI-powered translation - Demo mode with pre-translated common phrases - Supports English and Kiswahili to Kikuyu translation ### 🔊 Text-to-Speech - ElevenLabs API for high-quality voice synthesis - Browser Web Speech API as fallback - Toggle between engines on-the-fly ### 📺 YouTube Pipeline 1. Download audio from YouTube using yt-dlp 2. Transcribe to English using OpenAI Whisper 3. Translate to Kikuyu using Gemini 4. Speak in Kikuyu using ElevenLabs or browser speech ## Setup ### Prerequisites - Node.js 18+ - npm or yarn - yt-dlp (for YouTube feature) ### Installation 1. Clone the repository: ```bash git clone cd gikuyu-demo ``` 2. Install dependencies: ```bash npm install ``` 3. Create `.env.local` file: ```env GEMINI_API_KEY=your_gemini_api_key_here OPENAI_API_KEY=your_openai_api_key_here ELEVENLABS_API_KEY=your_elevenlabs_api_key_here USE_DEMO_MODE=true ``` 4. Install yt-dlp (for YouTube feature): ```bash # Windows (using winget) winget install yt-dlp # Or download from: github.com ``` ### API Keys - **Gemini API**: Get from Google AI Studio - **OpenAI API**: Get from OpenAI Platform - **ElevenLabs API**: Get from ElevenLabs ### Demo Mode Set `USE_DEMO_MODE=true` to use pre-translated phrases without API keys. Try phrases like: - "hello" → "Wĩ mwega" - "thank you" → "Nĩ wega mũno" - "good morning" → "Ũrĩa mwega rũciinĩ" ## Usage 1. Start the development server: ```bash npm run dev ``` 2. Open localhost