Lenylvt commited on
Commit
bfe6e49
·
verified ·
1 Parent(s): 3678816

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -78,7 +78,7 @@ def translate_srt(input_file_path, source_language_code, target_language_code, p
78
  def transcribe(audio_file_path, model_size="base"):
79
  device = "cpu"
80
  compute_type = "int8"
81
- model = WhisperModel(model_size=model_size, device=device, compute_type=compute_type)
82
  segments, _ = model.transcribe(audio_file_path)
83
  transcription_with_timestamps = [
84
  f"[{format_timestamp(segment.start)} -> {format_timestamp(segment.end)}] {segment.text}"
 
78
  def transcribe(audio_file_path, model_size="base"):
79
  device = "cpu"
80
  compute_type = "int8"
81
+ model = WhisperModel(model_size, device=device, compute_type=compute_type)
82
  segments, _ = model.transcribe(audio_file_path)
83
  transcription_with_timestamps = [
84
  f"[{format_timestamp(segment.start)} -> {format_timestamp(segment.end)}] {segment.text}"