File size: 1,739 Bytes
1a0463d
 
 
 
 
 
 
 
 
 
 
 
24ac137
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1a0463d
 
 
 
 
24ac137
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
---
title: DAI_Project
emoji: 🎬
colorFrom: blue
colorTo: purple
sdk: gradio
sdk_version: 4.44.1
app_file: app.py
pinned: false
license: apache-2.0
---

Video Subtitle Generator with Translation & Multi-Format Output

This project provides a tool to generate subtitles from video files using OpenAI's Whisper model 
for transcription. It also supports translation into multiple languages using the M2M100 translation
model from Hugging Face. The subtitles can be exported in various formats, including SRT files, hardsubbed video,
Word documents, PDF files, or PowerPoint slides.

Features:

Automatic Transcription: Transcribe audio from video files into text using 
Whisper models (Tiny, Base, Small, Medium, Large).

Multi-Language Translation: Translate the generated subtitles into different languages such as Persian, Spanish,
French, German, Italian and Portuguese using M2M100.

Multi-Format Export: Export subtitles in the following formats:
SRT (Subtitle file format)
Video with embedded subtitles (hardsub)
Word document (.docx)
PDF file
PowerPoint presentation (.pptx)

Right-to-Left Language Support: Proper handling of RTL languages like
Persian and Arabic in both Word and PDF formats.

Usage
You can use this tool through a Gradio interface to upload a video, 
select the language of the video, choose the target translation language, 
and export the subtitles in your desired format.

Supported Whisper Models
Tiny (Fast, Less Accurate)
Base (Medium Speed, Medium Accuracy)
Small (Good Speed, Good Accuracy)
Medium (Slow, High Accuracy)
Large (Very Slow, Highest Accuracy)

## Notes

- Maximum video size: 1GB
- Processing time depends on video length and selected options
- Internet connection required for translations