LAP-DEV commited on
Commit
623f8c9
·
verified ·
1 Parent(s): 1a1cc77

Update modules/whisper/whisper_base.py

Browse files
Files changed (1) hide show
  1. modules/whisper/whisper_base.py +7 -4
modules/whisper/whisper_base.py CHANGED
@@ -266,8 +266,11 @@ class WhisperBase(ABC):
266
  # Translate to English using Whisper built-in functionality
267
  transcription_note = ""
268
  if params.is_translate:
269
- transcription_note = "To English (Whisper)"
270
- source_lang = "English"
 
 
 
271
 
272
  # Translate the transcribed segments
273
  translation_note = ""
@@ -282,9 +285,9 @@ class WhisperBase(ABC):
282
  tgt_lang=target_lang,
283
  speaker_diarization=params.is_diarize
284
  )
285
- translation_note = "To " + target_lang + " (Facebook NLLB)"
286
  else:
287
- translation_note = source_lang + " not supported (Facebook NLLB)"
288
  else:
289
  translation_note = "Already in " + target_lang
290
 
 
266
  # Translate to English using Whisper built-in functionality
267
  transcription_note = ""
268
  if params.is_translate:
269
+ if source_lang != "English":
270
+ transcription_note = "To English"
271
+ source_lang = "English"
272
+ else:
273
+ transcription_note = "Already in " + target_lang
274
 
275
  # Translate the transcribed segments
276
  translation_note = ""
 
285
  tgt_lang=target_lang,
286
  speaker_diarization=params.is_diarize
287
  )
288
+ translation_note = "To " + target_lang
289
  else:
290
+ translation_note = source_lang + " not supported"
291
  else:
292
  translation_note = "Already in " + target_lang
293