Skip to content

๐Ÿงžโ€โ™‚๏ธ GenieText โ€“ Your Multilingual AI Assistant โœจ GenieText is a simple AI-powered web app that translates text between languages using Flask and the deep-translator API. It offers a clean interface, fast results, and is perfect for learning, travel, or demos. Built for ease, speed, and multilingual communication.

Notifications You must be signed in to change notification settings

Sandarsh18/GenieText

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

6 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŒ Multi-Language Translator

Python Flask License Web Speech API

A beautiful and responsive web application built with Python and Flask that translates text between multiple languages, with a special focus on 11 Indian languages. It uses the deep-translator library to interface with the Google Translate API. Key features include a modern UI, specialized fonts for Indic scripts, and client-side text-to-speech functionality using the Web Speech API.


โœจ Features

  • ๐ŸŒ Multi-language Support: 11 Indian languages supported
  • ๐Ÿ”Š Text-to-Speech: Listen to translated text in the correct accent
  • ๐ŸŽจ Beautiful UI: Modern responsive design with animations and gradients
  • ๐Ÿ–‹๏ธ Optimized Fonts: Noto Sans for crisp Indic script rendering
  • โšก Real-time Translation: Powered by Google Translate via deep-translator
  • ๐Ÿงญ Interactive Controls: Swap, copy, clear, and listen functionalities
  • ๐Ÿ†Ž Font Testing: Built-in Kannada font rendering tester
  • ๐Ÿ“ฑ Responsive Design: Works great on mobile and desktop
  • ๐Ÿง  Error Handling: Friendly user messages and validations

๐Ÿงฐ Tech Stack

Layer Technology
Backend Python, Flask
Frontend HTML5, CSS3, JavaScript (ES6+)
Fonts Google Fonts (Noto Sans)
Translation deep-translator, Google Translate API
TTS Web Speech API (client-side)

๐Ÿ“‚ File Structure

Gen AI/
โ”œโ”€โ”€ app.py
โ”œโ”€โ”€ requirement.txt
โ””โ”€โ”€ templates/
    โ””โ”€โ”€ index.html

๐Ÿš€ Setup & Usage

๐Ÿ”ง Prerequisites

  • Python 3.7+
  • pip package manager

โš™๏ธ Installation

# Clone the repo
git clone <repo-url>
cd Gen\ AI/

# Install dependencies
pip install -r requirement.txt

โ–ถ๏ธ Run the App

python app.py

Visit: http://localhost:5000


๐Ÿ“ก API Endpoints

Method Endpoint Description
GET / Renders the translator interface
POST /translate Handles translation request
GET /test_kannada Returns sample Kannada text

Example Request (POST /translate)

{
  "text": "Hello",
  "source_lang": "English",
  "target_lang": "Hindi"
}

Example Response

{
  "success": true,
  "translated_text": "เคจเคฎเคธเฅเคคเฅ‡",
  "target_lang_speech_code": "hi-IN"
}

๐Ÿ—ฃ๏ธ Supported Languages

Language Code Speech Code
English en en-US
Hindi hi hi-IN
Kannada kn kn-IN
Tamil ta ta-IN
Telugu te te-IN
Bengali bn bn-IN
Marathi mr mr-IN
Gujarati gu gu-IN
Malayalam ml ml-IN
Punjabi pa pa-IN
Urdu ur ur-IN

๐ŸŒ Browser Compatibility

Browser Logo Version
Chrome chrome 70+
Firefox firefox 65+
Safari safari 12+
Edge edge 79+

๐Ÿ”” Note: Text-to-speech support depends on each browser's Web Speech API implementation.


๐Ÿ› ๏ธ Deployment

๐Ÿงช Local Development

python app.py

โš™๏ธ Production (Gunicorn + Nginx)

pip install gunicorn
gunicorn -w 4 -b 0.0.0.0:5000 app:app

๐Ÿค Contributing

  1. Fork this repository
  2. Create a new feature branch (git checkout -b feature-name)
  3. Make your changes and commit (git commit -am 'Add new feature')
  4. Push to the branch (git push origin feature-name)
  5. Open a Pull Request

๐Ÿ“ License

This project is licensed under the MIT License.


๐Ÿ› Known Issues

  • Translation accuracy depends on Google Translate API.
  • Font rendering may vary across operating systems.
  • TTS voices depend on the browser's capabilities.

๐Ÿ”ฎ Future Enhancements

  • Add text-to-speech functionality
  • Add more Indian and international languages
  • Translation history with export option
  • File upload for document translation
  • User authentication for personal preferences
  • Offline translation using local models
  • Confidence scores for translations

โค๏ธ Final Note

Made with โค๏ธ for multilingual communication

About

๐Ÿงžโ€โ™‚๏ธ GenieText โ€“ Your Multilingual AI Assistant โœจ GenieText is a simple AI-powered web app that translates text between languages using Flask and the deep-translator API. It offers a clean interface, fast results, and is perfect for learning, travel, or demos. Built for ease, speed, and multilingual communication.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published