A simple voice translation application that recognizes speech, translates it into a selected language, and converts the translated text into speech.
- Speech recognition using
speech_recognition
library. - Translation using
translate
library. - Text-to-speech conversion using
gTTS
. - Simple GUI input using
tkinter
for selecting languages and user interaction. - Plays translated speech using
pygame
.
Ensure you have the following installed:
- Python 3.x
- Required libraries:
pip install speechrecognition translate gtts pygame tkinter
- Clone the repository:
git clone https://syar-kota/speechREC.git cd your-repo
- Install dependencies:
pip install -r requirements.txt
- Run the script:
SpeecREC.py
- The application will prompt you to enter the source and destination languages (e.g.,
en
for English,fr
for French). - After confirming, you will be prompted to speak.
- The recognized speech will be translated and converted to speech in the target language.
- You can choose to translate another phrase, change languages, or exit.
The application supports all languages available in Google Translate and Google Text-to-Speech (gTTS
). Use language codes (e.g., en
for English, es
for Spanish, hi
for Hindi).
- Background noise may affect speech recognition accuracy.
- The translation library may not support all phrases correctly.
gTTS
requires an internet connection.
This project is licensed under the MIT License.
Feel free to contribute and improve the project!