This project is a demonstration of using Gemini to detect spoken language and translate the spoken sentence into a selected language.
- 🎤 Voice Input: Captures user speech for translation.
- 🌐 Language Detection: Automatically identifies the source language.
- 🤖 AI-Powered Translation: Uses the Gemini API for accurate translation.
- 🔊 Text-to-Speech: Listen to the pronunciation of translated text.
- UI: Jetpack Compose with Material 3.
- Architecture: Clean Architecture, MVVM, Repository Pattern.
- Asynchronous: Kotlin Coroutines for managing background threads.
- AI: Google AI Client SDK for Android (
com.google.ai.client.generativeai). - Dependency Injection: Hilt.
- Local Storage: Room (if you've added history).
- Android Studio Koala (2024.1.1) or newer.
- Android SDK 34+.
- An API Key from Google AI Studio.
-
Clone the Repository:
git clone https://github.com/anandmali/Translator.git cd Translator -
Obtain Gemini API Key:
- Visit Google AI Studio
- Create a new project and generate an API key
-
Configure API Key:
-
Create a
local.propertiesfile in the root directory -
Add the following line:
GEMINI_API_KEY=your_api_key_here
-