Lenylvt commited on
Commit
1aee38e
·
verified ·
1 Parent(s): dbd3c19

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -42,7 +42,7 @@ def transcribe_and_optionally_translate(video_file, source_language, target_lang
42
  device = "cpu" # GPU : cuda CPU : cpu
43
  compute_type = "int8" # GPU : float16 or int8 - CPU : int8
44
  model = WhisperModel(model_size, device=device, compute_type=compute_type)
45
- segments, _ = model.transcribe(audio_file, source_language=source_language)
46
  transcription = " ".join([segment.text for segment in segments])
47
 
48
  # Translation
 
42
  device = "cpu" # GPU : cuda CPU : cpu
43
  compute_type = "int8" # GPU : float16 or int8 - CPU : int8
44
  model = WhisperModel(model_size, device=device, compute_type=compute_type)
45
+ segments, _ = model.transcribe(audio_file)
46
  transcription = " ".join([segment.text for segment in segments])
47
 
48
  # Translation