Update modules/whisper/whisper_base.py
Browse files
modules/whisper/whisper_base.py
CHANGED
|
@@ -414,7 +414,7 @@ class WhisperBase(ABC):
|
|
| 414 |
html_multi_tab = (" ")*3
|
| 415 |
html_single_tab = " "
|
| 416 |
html_newline = "<BR>"
|
| 417 |
-
title_line = f'{html_multi_tab}Media file
|
| 418 |
title_line += f'{html_newline}{html_multi_tab}Language:{html_single_tab}{info["lang"]} (probability {info["lang_prob"]}%)'
|
| 419 |
if params.is_translate: title_line += f'{html_newline}{html_multi_tab}Translation:{html_single_tab}{info["transcription"]} (Handled by OpenAI Whisper)'
|
| 420 |
if translate_output: title_line += f'{html_newline}{html_multi_tab}Translation:{html_single_tab}{info["translation"]} (Handled by Facebook NLLB)'
|
|
@@ -629,7 +629,7 @@ class WhisperBase(ABC):
|
|
| 629 |
@staticmethod
|
| 630 |
def transform_text_to_list(inputdata: str) -> list:
|
| 631 |
outputdata = []
|
| 632 |
-
temp_inputdata = inputdata.split("\n")
|
| 633 |
for temp_line in temp_inputdata:
|
| 634 |
temp_line_items = temp_line.split("\t")
|
| 635 |
col_time,col_speaker,col_text = "","",""
|
|
|
|
| 414 |
html_multi_tab = (" ")*3
|
| 415 |
html_single_tab = " "
|
| 416 |
html_newline = "<BR>"
|
| 417 |
+
title_line = f'{html_multi_tab}<B>Media file:</B>{html_single_tab}{info["input_source_file"]}'
|
| 418 |
title_line += f'{html_newline}{html_multi_tab}Language:{html_single_tab}{info["lang"]} (probability {info["lang_prob"]}%)'
|
| 419 |
if params.is_translate: title_line += f'{html_newline}{html_multi_tab}Translation:{html_single_tab}{info["transcription"]} (Handled by OpenAI Whisper)'
|
| 420 |
if translate_output: title_line += f'{html_newline}{html_multi_tab}Translation:{html_single_tab}{info["translation"]} (Handled by Facebook NLLB)'
|
|
|
|
| 629 |
@staticmethod
|
| 630 |
def transform_text_to_list(inputdata: str) -> list:
|
| 631 |
outputdata = []
|
| 632 |
+
temp_inputdata = (inputdata.rstrip("\n").split("\n")
|
| 633 |
for temp_line in temp_inputdata:
|
| 634 |
temp_line_items = temp_line.split("\t")
|
| 635 |
col_time,col_speaker,col_text = "","",""
|