The Real-Time Translator is a Python-based application that provides real-time translation of spoken language. It utilizes the Whisper model for speech-to-text transcription and the M2M100 model for language translation. The application also monitors system resource usage to ensure efficient performance.
- Real-time audio transcription and translation
- Supports multiple languages
- Speaker identification
- Resource usage monitoring (CPU, Memory, Disk, Network)
- Configurable resource usage limits
- Python 3.7 or higher
- Required Python packages:
sounddevice
numpy
transformers
whisper
queue
threading
customtkinter
torch
datetime
time
os
scipy
sklearn
psutil
matplotlib
tkinter
-
Clone the repository:
git clone https://github.com/yourusername/realtime-translator.git cd realtime-translator
-
Create a virtual environment and activate it:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the required packages:
pip install -r requirements.txt
-
Download the necessary models:
# This will automatically download the models when you run the script
-
Run the application:
python translator_app.py
-
Use the graphical interface to select source and target languages, start and stop translation, and monitor resource usage.
- CPU and Memory usage limits can be configured in the
Config
tab. - Resource usage statistics are available in the
Resources
tab.
This project is licensed under the MIT License.
This project makes use of the following open-source libraries and tools:
-
sounddevice
- License: MIT License
- Repository: python-sounddevice
-
numpy
- License: BSD License
- Repository: numpy
-
transformers
- License: Apache 2.0 License
- Repository: transformers
-
whisper
- License: MIT License
- Repository: whisper
-
queue (Python Standard Library)
- License: Python Software Foundation License
- Documentation: queue
-
threading (Python Standard Library)
- License: Python Software Foundation License
- Documentation: threading
-
customtkinter
- License: MIT License
- Repository: customtkinter
-
torch
- License: BSD License
- Repository: pytorch
-
datetime (Python Standard Library)
- License: Python Software Foundation License
- Documentation: datetime
-
time (Python Standard Library)
- License: Python Software Foundation License
- Documentation: time
-
os (Python Standard Library)
- License: Python Software Foundation License
- Documentation: os
-
scipy
- License: BSD License
- Repository: scipy
-
sklearn (scikit-learn)
- License: BSD License
- Repository: scikit-learn
-
psutil
- License: BSD License
- Repository: psutil
-
matplotlib
- License: Matplotlib License (BSD compatible)
- Repository: matplotlib
-
tkinter (Python Standard Library)
- License: Python Software Foundation License
- Documentation: tkinter
We gratefully acknowledge the contributions of the developers and maintainers of these libraries.