A web-based application that provides real-time text and voice translation between multiple languages (English, Hindi, Russian and other European languages) using Neural Machine Translation (NMT) models from Helsinki-NLP and Hugging Face Transformers.
- π Bidirectional translation: Between languages such as English, Hindi, Russian and European languages
- π§ NMT-based translation using MarianMT (Helsinki-NLP)
- π€ Speech-to-text input using Web Speech API
- π Text-to-speech output for translated text
- π Simple and responsive UI using HTML, CSS, JS
- π§© Backend built with Python & Django
- Transformer: MarianMT by Helsinki-NLP
- Translation direction: Between languages such as English, Hindi, Russian and European languages
- Model provider: Hugging Face Transformers
Example models used:
Helsinki-NLP/opus-mt-en-hiHelsinki-NLP/opus-mt-en-deHelsinki-NLP/opus-mt-en-ru- And reverse models like
opus-mt-hi-en, etc.
python -m venv myenv
- Windows: myenv\Scripts\activate
- macOS/Linux: source myenv/bin/activate
pip install django transformers torch sentencepiece
python manage.py migrate
python manage.py runserver
Now visit http://127.0.0.1:8000 in your browser.
- HTML/CSS for layout and design
- JavaScript (Web Speech API) for microphone and speaker integration
- AJAX for async requests to the backend
- π§ Hugging Face Transformers (MarianMT models)
- π Django (Backend)
- π€ Web Speech API (Speech-to-Text and Text-to-Speech)
- ποΈ SQLite (Lightweight storage)