Spaces:
Running
Running
jhj0517
commited on
Commit
·
4e33cb4
1
Parent(s):
f87a7ef
Fix webvtt format
Browse files
modules/utils/subtitle_manager.py
CHANGED
|
@@ -376,7 +376,6 @@ def get_writer(
|
|
| 376 |
output_format: str, output_dir: str
|
| 377 |
) -> Callable[[dict, TextIO, dict], None]:
|
| 378 |
output_format = output_format.strip().lower().replace(".", "")
|
| 379 |
-
output_format = "vtt" if output_format == "webvtt" else output_format
|
| 380 |
|
| 381 |
writers = {
|
| 382 |
"txt": WriteTXT,
|
|
@@ -406,6 +405,7 @@ def generate_file(
|
|
| 406 |
add_timestamp: bool = True, **kwargs
|
| 407 |
) -> Tuple[str, str]:
|
| 408 |
output_format = output_format.strip().lower().replace(".", "")
|
|
|
|
| 409 |
|
| 410 |
if add_timestamp:
|
| 411 |
timestamp = datetime.now().strftime("%m%d%H%M%S")
|
|
|
|
| 376 |
output_format: str, output_dir: str
|
| 377 |
) -> Callable[[dict, TextIO, dict], None]:
|
| 378 |
output_format = output_format.strip().lower().replace(".", "")
|
|
|
|
| 379 |
|
| 380 |
writers = {
|
| 381 |
"txt": WriteTXT,
|
|
|
|
| 405 |
add_timestamp: bool = True, **kwargs
|
| 406 |
) -> Tuple[str, str]:
|
| 407 |
output_format = output_format.strip().lower().replace(".", "")
|
| 408 |
+
output_format = "vtt" if output_format == "webvtt" else output_format
|
| 409 |
|
| 410 |
if add_timestamp:
|
| 411 |
timestamp = datetime.now().strftime("%m%d%H%M%S")
|