Spaces:
Sleeping
Sleeping
Create README.md
Browse files
README.md
CHANGED
|
@@ -1,14 +1,95 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: gradio
|
| 7 |
-
sdk_version:
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
license: mit
|
| 11 |
-
|
|
|
|
| 12 |
---
|
| 13 |
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: Video Subtitle Translator
|
| 3 |
+
emoji: π¬
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: purple
|
| 6 |
sdk: gradio
|
| 7 |
+
sdk_version: 4.44.0
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
license: mit
|
| 11 |
+
hardware: cpu-basic
|
| 12 |
+
short_description: VideoSubtitles
|
| 13 |
---
|
| 14 |
|
| 15 |
+
# π¬ Video Subtitle Translator
|
| 16 |
+
|
| 17 |
+
A lightweight and powerful Hugging Face Space that generates and translates subtitles for any video file with **no size or duration limits**.
|
| 18 |
+
|
| 19 |
+
## β¨ Features
|
| 20 |
+
|
| 21 |
+
- **π― No Limits**: Process videos of any size or duration
|
| 22 |
+
- **π Multi-language Support**: Auto-detects 50+ languages and translates to English
|
| 23 |
+
- **β‘ Lightweight Models**: Uses efficient Whisper Base and Helsinki translation models
|
| 24 |
+
- **π± Universal Compatibility**: Supports all video formats (MP4, AVI, MOV, MKV, etc.)
|
| 25 |
+
- **π§ Standard Output**: Generates SRT subtitle files compatible with all media players
|
| 26 |
+
- **π Fast Processing**: Optimized for speed while maintaining quality
|
| 27 |
+
|
| 28 |
+
## π οΈ How It Works
|
| 29 |
+
|
| 30 |
+
1. **Upload** any video file
|
| 31 |
+
2. **Choose** whether to translate to English or keep original language
|
| 32 |
+
3. **Process** - the app will:
|
| 33 |
+
- Extract audio from your video
|
| 34 |
+
- Transcribe speech using Whisper
|
| 35 |
+
- Detect the source language automatically
|
| 36 |
+
- Translate to English (if requested)
|
| 37 |
+
- Generate downloadable SRT files
|
| 38 |
+
|
| 39 |
+
## π§ Technical Details
|
| 40 |
+
|
| 41 |
+
### Models Used
|
| 42 |
+
- **Speech Recognition**: OpenAI Whisper Base (fast, lightweight)
|
| 43 |
+
- **Translation**: Helsinki-NLP/opus-mt-mul-en (multilingual to English)
|
| 44 |
+
- **Audio Processing**: FFmpeg for universal video format support
|
| 45 |
+
|
| 46 |
+
### Key Optimizations
|
| 47 |
+
- Lazy model loading to save memory
|
| 48 |
+
- Chunked processing for long videos
|
| 49 |
+
- Automatic GPU acceleration when available
|
| 50 |
+
- Efficient audio extraction pipeline
|
| 51 |
+
|
| 52 |
+
## π Usage Instructions
|
| 53 |
+
|
| 54 |
+
1. Click "Upload Video File" and select your video
|
| 55 |
+
2. Choose "Yes" to translate to English, or "No" for transcription only
|
| 56 |
+
3. Click "Generate Subtitles" and wait for processing
|
| 57 |
+
4. Download the generated SRT files
|
| 58 |
+
5. Use the subtitle files with any video player (VLC, Media Player, etc.)
|
| 59 |
+
|
| 60 |
+
## π Supported Languages
|
| 61 |
+
|
| 62 |
+
The app automatically detects and can translate from 50+ languages including:
|
| 63 |
+
- Spanish, French, German, Italian, Portuguese
|
| 64 |
+
- Chinese (Mandarin), Japanese, Korean
|
| 65 |
+
- Arabic, Hindi, Russian, Turkish
|
| 66 |
+
- And many more...
|
| 67 |
+
|
| 68 |
+
## π― Use Cases
|
| 69 |
+
|
| 70 |
+
- **Content Creators**: Add subtitles to YouTube videos, tutorials, podcasts
|
| 71 |
+
- **Educators**: Make educational content accessible in multiple languages
|
| 72 |
+
- **Businesses**: Translate training videos, presentations, webinars
|
| 73 |
+
- **Personal**: Add subtitles to family videos, travel vlogs
|
| 74 |
+
- **Accessibility**: Make video content accessible to deaf/hard-of-hearing viewers
|
| 75 |
+
|
| 76 |
+
## π Getting Started
|
| 77 |
+
|
| 78 |
+
Simply upload your video and click "Generate Subtitles" - it's that easy!
|
| 79 |
+
|
| 80 |
+
## π Output Format
|
| 81 |
+
|
| 82 |
+
The app generates standard SRT (SubRip) subtitle files that work with:
|
| 83 |
+
- VLC Media Player
|
| 84 |
+
- Windows Media Player
|
| 85 |
+
- YouTube (for upload)
|
| 86 |
+
- Streaming platforms
|
| 87 |
+
- All major video editing software
|
| 88 |
+
|
| 89 |
+
## π€ Contributing
|
| 90 |
+
|
| 91 |
+
Feel free to suggest improvements or report issues!
|
| 92 |
+
|
| 93 |
+
---
|
| 94 |
+
|
| 95 |
+
*Built with β€οΈ using Gradio, Whisper, and Transformers*
|