LAP-DEV commited on
Commit
40f3e30
·
verified ·
1 Parent(s): 61c3ab0

Update modules/whisper/whisper_base.py

Browse files
Files changed (1) hide show
  1. modules/whisper/whisper_base.py +7 -2
modules/whisper/whisper_base.py CHANGED
@@ -260,8 +260,13 @@ class WhisperBase(ABC):
260
 
261
 
262
  # Translate the trandscribed segments
263
- test = TranslationBase.translate_text(transcribed_segments,"facebook/nllb-200-distilled-600M","English","Dutch")
264
- print(test)
 
 
 
 
 
265
 
266
  ## Get preview as txt
267
  file_name, file_ext = os.path.splitext(os.path.basename(file))
 
260
 
261
 
262
  # Translate the trandscribed segments
263
+ try:
264
+ test = TranslationBase.translate_text(transcribed_segments,"facebook/nllb-200-distilled-600M","English","Dutch")
265
+ print(test)
266
+ except Exception as e:
267
+ print(f"Error: {str(e)}")
268
+ finally:
269
+ print("Continue...")
270
 
271
  ## Get preview as txt
272
  file_name, file_ext = os.path.splitext(os.path.basename(file))