https://github.com/lperezmo/real-time-translator
A quick app to translate speech in real time using the Whisper API for transcribing audio, translating, and then using Google Text-to-Speech (gTTS) to play out the translation.
https://github.com/lperezmo/real-time-translator
openai-api python speech-recognition speech-synthesis streamlit text-to-speech tts whisper-ai
Last synced: 8 months ago
JSON representation
A quick app to translate speech in real time using the Whisper API for transcribing audio, translating, and then using Google Text-to-Speech (gTTS) to play out the translation.
- Host: GitHub
- URL: https://github.com/lperezmo/real-time-translator
- Owner: lperezmo
- License: gpl-3.0
- Created: 2023-03-03T02:43:28.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-02-11T19:20:30.000Z (over 1 year ago)
- Last Synced: 2025-04-08T17:54:22.560Z (about 1 year ago)
- Topics: openai-api, python, speech-recognition, speech-synthesis, streamlit, text-to-speech, tts, whisper-ai
- Language: Python
- Homepage:
- Size: 900 KB
- Stars: 33
- Watchers: 3
- Forks: 11
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Real-Time Translator
[](https://translator.streamlitapp.com/)





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.
## Features
- 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).
## Demo
You can try out the app here: https://translator.streamlit.app/
Alternatively, you can run the app locally by following the installation instructions below
## Installation
To run the app locally, you need to have Python 3.7+ and pip installed.
1. Clone this repository: `git clone https://github.com/lperezmo/real-time-translator.git`
2. Navigate to the project directory: `cd real-time-translator`
3. Install the required packages: `pip install -r requirements.txt`
4. Run the app: `streamlit run app.py`
5. Open your browser and go to http://localhost:8501
## Usage
To use the app, follow these steps:
1. Click on the microphone and record audio while it's red.
2. If audio is not showing after recording click “rerun app” button at the top of the app.
## License
This project is licensed under the GPL-3.0 License - see [LICENSE.md](LICENSE.md) for details.