Update modules/whisper/whisper_base.py
Browse files
modules/whisper/whisper_base.py
CHANGED
@@ -416,7 +416,7 @@ class WhisperBase(ABC):
|
|
416 |
if params.is_translate: title_line += f'\n{tabbed_space}Translation:\t{info["transcription"]} (Handled by OpenAI Whisper)'
|
417 |
if translate_output: title_line += f'\n{tabbed_space}Translation:\t{info["translation"]} (Handled by Facebook NLLB)'
|
418 |
|
419 |
-
total_result += title_line+"#NEWLINE#"+(((info["subtitle"].rstrip("\n")).replace("\t","#TAB#")).replace("\n","#NEWLINE#"))
|
420 |
total_time += info["time_for_task"]
|
421 |
|
422 |
time_end = datetime.now()
|
@@ -626,10 +626,8 @@ class WhisperBase(ABC):
|
|
626 |
temp_line_items = temp_line.split("#TAB#")
|
627 |
|
628 |
# Add columns to match Dataframe
|
629 |
-
print(temp_line_items)
|
630 |
if timestamps==False and diarize==True: temp_line_items.insert(0,"")
|
631 |
if timestamps==True and diarize==False: temp_line_items.insert(1,"")
|
632 |
-
print(temp_line_items)
|
633 |
|
634 |
for temp_line_item in temp_line_items:
|
635 |
temp_line_list.append(temp_line_item)
|
|
|
416 |
if params.is_translate: title_line += f'\n{tabbed_space}Translation:\t{info["transcription"]} (Handled by OpenAI Whisper)'
|
417 |
if translate_output: title_line += f'\n{tabbed_space}Translation:\t{info["translation"]} (Handled by Facebook NLLB)'
|
418 |
|
419 |
+
total_result += "#TAB##TAB#"+title_line+"#NEWLINE#"+(((info["subtitle"].rstrip("\n")).replace("\t","#TAB#")).replace("\n","#NEWLINE#"))
|
420 |
total_time += info["time_for_task"]
|
421 |
|
422 |
time_end = datetime.now()
|
|
|
626 |
temp_line_items = temp_line.split("#TAB#")
|
627 |
|
628 |
# Add columns to match Dataframe
|
|
|
629 |
if timestamps==False and diarize==True: temp_line_items.insert(0,"")
|
630 |
if timestamps==True and diarize==False: temp_line_items.insert(1,"")
|
|
|
631 |
|
632 |
for temp_line_item in temp_line_items:
|
633 |
temp_line_list.append(temp_line_item)
|