LangTranslator is a real-time speech translation application built with Python. It converts spoken words into text, translates them into a target language, and provides an audio output of the translated text. This project leverages Speech Recognition, Machine Translation, and Text-to-Speech (TTS) to enhance communication across different languages.
- 🎙️ Speech Recognition: Captures spoken words using Google Speech Recognition
- 🌍 Translation: Converts recognized speech into multiple target languages
- 🔊 Text-to-Speech: Plays the translated text as audio output
- 🖥️ Streamlit Web Interface: Provides a user-friendly web-based UI for easy interaction
- 📡 Cross-Platform Support: Works on Windows, macOS, and Linux
LangTranslator currently supports translation and speech output for the following languages:
- 🇫🇷 French (fr)
- 🇪🇸 Spanish (es)
- 🇩🇪 German (de)
- 🇮🇳 Hindi (hi)
- 🇨🇳 Chinese (zh)
- 🇸🇦 Arabic (ar)
- 🇮🇳 Kannada (kn)
The project includes a Streamlit-based web interface where users can:
- Select a target language from a dropdown menu
- Click a button to start speech recognition
- View the recognized and translated text in real time
- Listen to the translated speech output with a single click
- Python for backend processing
- Google Speech Recognition API for speech-to-text conversion
- mtranslate for text translation
- gTTS (Google Text-to-Speech) for converting text to speech
- Streamlit for building the web interface
- Clone the repository:
git clone https://github.com/farhaan-arshad/LangTranslator.git
- Navigate to the project directory:
cd LangTranslator - Install dependencies:
pip install -r requirements.txt
- Run the Streamlit app:
streamlit run app.py
Farhaan Arshad