Update modules/whisper/whisper_base.py
Browse files
modules/whisper/whisper_base.py
CHANGED
|
@@ -270,6 +270,7 @@ class WhisperBase(ABC):
|
|
| 270 |
#files_info[file_name] = {"subtitle": subtitle, "time_for_task": time_for_task, "path": file_path, "lang": file_language, "lang_prob": file_lang_probs, "input_source_file": (file_name+file_ext)}
|
| 271 |
|
| 272 |
# Translate the transcribed segments
|
|
|
|
| 273 |
if translate_output:
|
| 274 |
self.nllb_inf = NLLBInference()
|
| 275 |
if file_language in NLLB_AVAILABLE_LANGS.keys():
|
|
@@ -280,7 +281,7 @@ class WhisperBase(ABC):
|
|
| 280 |
tgt_lang=target_lang,
|
| 281 |
speaker_diarization=params.is_diarize
|
| 282 |
)
|
| 283 |
-
translation_note =
|
| 284 |
else:
|
| 285 |
translation_note = file_language + " not supported"
|
| 286 |
|
|
|
|
| 270 |
#files_info[file_name] = {"subtitle": subtitle, "time_for_task": time_for_task, "path": file_path, "lang": file_language, "lang_prob": file_lang_probs, "input_source_file": (file_name+file_ext)}
|
| 271 |
|
| 272 |
# Translate the transcribed segments
|
| 273 |
+
translation_note = ""
|
| 274 |
if translate_output:
|
| 275 |
self.nllb_inf = NLLBInference()
|
| 276 |
if file_language in NLLB_AVAILABLE_LANGS.keys():
|
|
|
|
| 281 |
tgt_lang=target_lang,
|
| 282 |
speaker_diarization=params.is_diarize
|
| 283 |
)
|
| 284 |
+
translation_note = file_language + " to " + target_lang
|
| 285 |
else:
|
| 286 |
translation_note = file_language + " not supported"
|
| 287 |
|