A web app to translate speech in real time using the Whisper API for transcribing and translating recorded audio, and Google Text-to-Speech (gTTS) to play out the translation.
-
Transcribe speech from microphone or audio file
-
Translate speech or text into English from any language
-
Display translation results on screen as text
-
Translation synthesized as speech by Google text-to-speech module (gTTS).
You can try out the app here: https://translator.streamlit.app/
Alternatively, you can run the app locally by following the installation instructions below
To run the app locally, you need to have Python 3.7+ and pip installed.
-
Clone this repository:
git clone https://github.com/lperezmo/real-time-translator.git
-
Navigate to the project directory:
cd real-time-translator
-
Install the required packages:
pip install -r requirements.txt
-
Run the app:
streamlit run app.py
-
Open your browser and go to http://localhost:8501
To use the app, follow these steps:
-
Click on the microphone and record audio while it's red.
-
If audio is not showing after recording click “rerun app” button at the top of the app.
This project is licensed under the GPL-3.0 License - see LICENSE.md for details.