Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -136,7 +136,7 @@ def transcribe_to_srt(audio_file, language="hindi"):
|
|
| 136 |
|
| 137 |
# Post-process: Split long chunks for better readability
|
| 138 |
final_chunks = []
|
| 139 |
-
max_words =
|
| 140 |
max_duration = 5.0 # Maximum 5 seconds per subtitle
|
| 141 |
|
| 142 |
for chunk in result['chunks']:
|
|
@@ -358,7 +358,7 @@ with gr.Blocks(theme=gr.themes.Soft(), title="Hindi Subtitle Generator") as demo
|
|
| 358 |
|
| 359 |
**Current Implementation:** {"faster-whisper (CTranslate2)" if USE_FASTER_WHISPER else "transformers (PyTorch)"}
|
| 360 |
|
| 361 |
-
**Subtitle Settings:** Maximum
|
| 362 |
|
| 363 |
### API Usage
|
| 364 |
|
|
|
|
| 136 |
|
| 137 |
# Post-process: Split long chunks for better readability
|
| 138 |
final_chunks = []
|
| 139 |
+
max_words = 3 # Maximum 3 words per subtitle
|
| 140 |
max_duration = 5.0 # Maximum 5 seconds per subtitle
|
| 141 |
|
| 142 |
for chunk in result['chunks']:
|
|
|
|
| 358 |
|
| 359 |
**Current Implementation:** {"faster-whisper (CTranslate2)" if USE_FASTER_WHISPER else "transformers (PyTorch)"}
|
| 360 |
|
| 361 |
+
**Subtitle Settings:** Maximum 3 words per subtitle, 5 seconds max duration
|
| 362 |
|
| 363 |
### API Usage
|
| 364 |
|