An AI-powered multilingual voice translation system that converts Urdu speech to text and translates it into multiple languages with audio output capabilities.
- 🎤 Voice Recording: Record Urdu speech directly through your browser
- 📝 Speech-to-Text: Accurate Urdu transcription using Google Speech Recognition
- 🌐 Multi-Language Translation: Translate to English, Arabic, Chinese, Spanish, French, German, Turkish, and Persian
- 🔊 Text-to-Speech: Generate audio output in the target language
- 📱 RTL Support: Proper right-to-left text display for Urdu, Arabic, and Persian
- 📚 Dataset Integration: Information and utilities for training custom models
- Python 3.11+
- Internet connection (for Google's free APIs)
All dependencies are already installed in this Replit environment:
- streamlit
- SpeechRecognition (Google Speech API)
- deep-translator
- gtts (Google Text-to-Speech)
- librosa
- numpy
- pandas
- scipy
The application is configured to run automatically. If you need to start it manually:
streamlit run app.py --server.port 5000No API keys required! This application uses free Google services for speech recognition, translation, and text-to-speech.
- Select Target Language: Choose the language you want to translate to (English, Arabic, Chinese, etc.)
- Record Audio: Click "Start Recording" and speak in Urdu
- Play Recording: (Optional) Verify your recording by playing it back
- Translate: Click the "Translate" button to process your speech
- Listen to Translation: Generate and play the translated audio output
Tarjumaan includes utilities and information for the following datasets:
- Mozilla Common Voice Urdu: Open-source dataset with validated Urdu recordings
- UrduSpeech: Academic dataset for accent and dialect variation
- OPUS-100: Multilingual parallel corpus (Urdu ↔ 100+ languages)
- IndicTrans: Specialized for Indian languages including Urdu
- Tatoeba: Community-contributed multilingual sentences
The dataset_utils.py module provides tools for:
- Audio normalization and preprocessing
- Data augmentation (noise, speed, pitch variations)
- Text cleaning for Urdu script
- Parallel corpus creation
- Train/validation/test splits
- Dataset statistics calculation
from dataset_utils import DatasetUtilities
utils = DatasetUtilities()
# Normalize audio file
normalized_path = utils.normalize_audio('input.wav', 'output.wav')
# Clean Urdu text
clean_text = utils.clean_urdu_text(raw_urdu_text)
# Get dataset information
cv_info = utils.get_common_voice_info()
print(cv_info)Tarjumaan/
│
├── app.py # Main Streamlit application
├── dataset_utils.py # Dataset preprocessing utilities
├── .streamlit/
│ └── config.toml # Streamlit configuration
└── README.md # Project documentation
- Frontend: Streamlit
- Speech Recognition: Google Speech Recognition API (free)
- Translation: Google Translate (via deep-translator)
- Text-to-Speech: Google Text-to-Speech (gTTS)
- Audio Processing: SpeechRecognition, librosa
🎙️ User speaks: "میرا نام عبداللہ ہے"
📝 Transcribed: "میرا نام عبداللہ ہے"
🌐 Translated to English: "My name is Abdullah"
🔊 Audio output: [English speech audio]
- English
- Arabic (عربي)
- Chinese Simplified (简体中文)
- Chinese Traditional (繁體中文)
- Spanish (Español)
- French (Français)
- German (Deutsch)
- Turkish (Türkçe)
- Persian (فارسی)
- Fine-tuned custom models using collected datasets
- Batch translation for multiple audio files
- Translation history and export functionality
- Dialect and accent customization
- Real-time streaming translation
- Support for additional languages
This is an educational project demonstrating:
- Machine Learning & NLP
- Speech Recognition
- Multilingual Translation
- Web Application Development
This project is built for educational purposes and uses the following free services:
- Google Speech Recognition API
- Google Translate
- Google Text-to-Speech
- Google for providing free speech recognition, translation, and TTS APIs
- Mozilla Foundation for the Common Voice dataset
- OPUS Project for multilingual parallel corpora
- Google for translation and TTS services
Built with ❤️ using Streamlit and Python
Empowering multilingual communication through AI