Spaces:
Sleeping
Sleeping
| title: Video Subtitle Translator | |
| emoji: π¬ | |
| colorFrom: blue | |
| colorTo: purple | |
| sdk: gradio | |
| sdk_version: 4.44.0 | |
| app_file: app.py | |
| pinned: false | |
| license: mit | |
| hardware: cpu-basic | |
| short_description: VideoSubtitles | |
| # π¬ Video Subtitle Translator | |
| A lightweight and powerful Hugging Face Space that generates and translates subtitles for any video file with **no size or duration limits**. | |
| ## β¨ Features | |
| - **π― No Limits**: Process videos of any size or duration | |
| - **π Multi-language Support**: Auto-detects 50+ languages and translates to English | |
| - **β‘ Lightweight Models**: Uses efficient Whisper Base and Helsinki translation models | |
| - **π± Universal Compatibility**: Supports all video formats (MP4, AVI, MOV, MKV, etc.) | |
| - **π§ Standard Output**: Generates SRT subtitle files compatible with all media players | |
| - **π Fast Processing**: Optimized for speed while maintaining quality | |
| ## π οΈ How It Works | |
| 1. **Upload** any video file | |
| 2. **Choose** whether to translate to English or keep original language | |
| 3. **Process** - the app will: | |
| - Extract audio from your video | |
| - Transcribe speech using Whisper | |
| - Detect the source language automatically | |
| - Translate to English (if requested) | |
| - Generate downloadable SRT files | |
| ## π§ Technical Details | |
| ### Models Used | |
| - **Speech Recognition**: OpenAI Whisper Base (fast, lightweight) | |
| - **Translation**: Helsinki-NLP/opus-mt-mul-en (multilingual to English) | |
| - **Audio Processing**: FFmpeg for universal video format support | |
| ### Key Optimizations | |
| - Lazy model loading to save memory | |
| - Chunked processing for long videos | |
| - Automatic GPU acceleration when available | |
| - Efficient audio extraction pipeline | |
| ## π Usage Instructions | |
| 1. Click "Upload Video File" and select your video | |
| 2. Choose "Yes" to translate to English, or "No" for transcription only | |
| 3. Click "Generate Subtitles" and wait for processing | |
| 4. Download the generated SRT files | |
| 5. Use the subtitle files with any video player (VLC, Media Player, etc.) | |
| ## π Supported Languages | |
| The app automatically detects and can translate from 50+ languages including: | |
| - Spanish, French, German, Italian, Portuguese | |
| - Chinese (Mandarin), Japanese, Korean | |
| - Arabic, Hindi, Russian, Turkish | |
| - And many more... | |
| ## π― Use Cases | |
| - **Content Creators**: Add subtitles to YouTube videos, tutorials, podcasts | |
| - **Educators**: Make educational content accessible in multiple languages | |
| - **Businesses**: Translate training videos, presentations, webinars | |
| - **Personal**: Add subtitles to family videos, travel vlogs | |
| - **Accessibility**: Make video content accessible to deaf/hard-of-hearing viewers | |
| ## π Getting Started | |
| Simply upload your video and click "Generate Subtitles" - it's that easy! | |
| ## π Output Format | |
| The app generates standard SRT (SubRip) subtitle files that work with: | |
| - VLC Media Player | |
| - Windows Media Player | |
| - YouTube (for upload) | |
| - Streaming platforms | |
| - All major video editing software | |
| ## π€ Contributing | |
| Feel free to suggest improvements or report issues! | |
| --- | |
| *Built with β€οΈ using Gradio, Whisper, and Transformers* |