Skip to content

Hayder-IRAQ/SubLab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎬 SubLab β€” Professional Subtitle Studio

Auto-generate, translate, and burn subtitles into videos β€” all offline-capable.

Python License: CC BY-NC 4.0 Platform GPU


✨ Features

Feature Details
πŸ—£οΈ Speech Recognition OpenAI Whisper (7 model sizes) + Vosk (40+ languages, offline)
🌐 Translation Google Translate (online) + Argos Translate (offline)
πŸŽ₯ Video Maker Burn subtitles directly into video with custom styles
πŸ“‚ Batch Processing Process multiple video files at once
πŸ“€ Export Formats SRT, VTT, CSV, JSON
🌍 UI Languages English, Arabic, Russian, French, German, Spanish, Portuguese, Chinese, Japanese, Korean
πŸŒ™ Dark / Light Mode Full theme support
⚑ GPU Acceleration CUDA support for Whisper
πŸ› οΈ First-Run Wizard Auto-installs FFmpeg and required packages

πŸ“Έ Screenshots

Coming soon


πŸš€ Quick Start

1. Clone the repository

git clone https://github.com/Hayder-IRAQ/SubLab.git
cd SubLab

2. Create a virtual environment (recommended)

python -m venv venv

# Windows
venv\Scripts\activate

# Linux / macOS
source venv/bin/activate

3. Install dependencies

pip install -r requirements.txt

GPU users: Install PyTorch with CUDA support first:

pip install torch torchaudio --index-url https://download.pytorch.org/whl/cu121

4. Run SubLab

python main.py

On first launch, the Setup Wizard will automatically:

  • Detect your system
  • Download FFmpeg if needed
  • Verify all required packages
  • Let you choose your preferred UI language

πŸ“¦ Dependencies

Package Purpose
PyQt5 GUI framework
openai-whisper AI speech recognition
vosk Offline speech recognition
googletrans Online translation
argostranslate Offline translation
moviepy Video processing
opencv-python Video frame handling
arabic-reshaper + python-bidi Arabic text rendering
torch (optional) GPU acceleration

πŸ—‚οΈ Project Structure

SubLab/
β”œβ”€β”€ main.py                  # Entry point & setup wizard
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ audio/
β”‚   └── extractor.py         # FFmpeg / OpenCV audio extraction
β”œβ”€β”€ engines/
β”‚   β”œβ”€β”€ whisper_engine.py    # OpenAI Whisper engine (GPU-accelerated)
β”‚   └── vosk_engine.py       # Vosk offline engine (40+ languages)
β”œβ”€β”€ translation/
β”‚   β”œβ”€β”€ translator.py        # Unified translation manager
β”‚   β”œβ”€β”€ google_translator.py # Google Translate backend
β”‚   └── argos_translator.py  # Argos Translate backend (offline)
β”œβ”€β”€ ui/
β”‚   β”œβ”€β”€ main_window.py       # Main application window
β”‚   β”œβ”€β”€ subtitle_editor.py   # Subtitle editing widget
β”‚   β”œβ”€β”€ subtitle_translator_tab.py
β”‚   β”œβ”€β”€ video_maker_tab.py
β”‚   β”œβ”€β”€ video_generator.py
β”‚   └── template_manager.py
β”œβ”€β”€ utils/
β”‚   β”œβ”€β”€ config.py            # Configuration management
β”‚   β”œβ”€β”€ export.py            # SRT / VTT / CSV / JSON export
β”‚   β”œβ”€β”€ i18n.py              # Internationalization (10 languages)
β”‚   β”œβ”€β”€ logger.py            # Logging setup
β”‚   β”œβ”€β”€ setup_wizard.py      # First-run wizard
β”‚   └── time_utils.py        # Subtitle timestamp utilities
β”œβ”€β”€ models/
β”‚   β”œβ”€β”€ whisper/             # Whisper model cache
β”‚   └── vosk/                # Vosk model files
β”œβ”€β”€ icons/                   # Application icons
└── tests/                   # Unit & integration tests

πŸ§ͺ Running Tests

pip install pytest
pytest tests/ -v

πŸŽ™οΈ Speech Engine Comparison

Whisper Vosk
Accuracy ⭐⭐⭐⭐⭐ ⭐⭐⭐⭐
Speed Medium (GPU: Fast) Fast
Offline βœ… βœ…
Languages 99+ 40+
GPU Support βœ… CUDA ❌
Model Size 39 MB – 1.5 GB 32 MB – 2.3 GB

🌐 Translation Engines

Google Translate Argos Translate
Internet Required βœ… ❌ (fully offline)
Languages 130+ 30+ pairs
Quality Excellent Good
Cost Free (unofficial API) Free & open source

πŸ—£οΈ Supported Vosk Languages

English Β· Arabic Β· Chinese Β· Russian Β· French Β· German Β· Spanish Β· Portuguese Β· Italian Β· Dutch Β· Turkish Β· Japanese Β· Korean Β· Hindi Β· Polish Β· Ukrainian Β· Greek Β· Vietnamese Β· Farsi Β· Filipino Β· Kazakh Β· Swedish Β· Uzbek Β· and more…


βš™οΈ Configuration

Settings are saved automatically to:

  • Windows: %APPDATA%\VideoSubtitleGenerator\Settings.json
  • Linux/macOS: ~/.config/VideoSubtitleGenerator/Settings.json

🀝 Contributing

Contributions are welcome! Please open an issue or submit a pull request.

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/my-feature
  3. Commit your changes: git commit -m "Add my feature"
  4. Push to the branch: git push origin feature/my-feature
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the Creative Commons Attribution-NonCommercial 4.0 International License.

You may use, share, and adapt this work for non-commercial purposes only, with appropriate credit.

View License Β· CC BY-NC 4.0


πŸ‘€ Author

Hayder Odhafa
GitHub: @Hayder-IRAQ


Made with ❀️ β€” SubLab v3.0 Β© 2025 Hayder Odhafa

About

🎬 Auto-generate & translate video subtitles using Whisper AI β€” offline, GPU-accelerated, supports 40+ languages

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages