TanelAlumae commited on
Commit
56f07a2
·
verified ·
1 Parent(s): 857ff61

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -80,10 +80,10 @@ def do_transcribe(inputs):
80
  return convert_to_vtt(result)
81
 
82
  def transcribe(file_path):
83
- audio_data, sampling_rate = ffmpeg_read(file_path)
84
 
85
  # Calculate the length in seconds
86
- audio_length = len(audio_data) / sampling_rate
87
  expected_transcribe_duration = audio_length / 5.0
88
  gr.Info(f"Starting to transcribe, requesting a GPU for {expected_transcribe_duration} seconds")
89
  return dynamic_gpu_duration(do_transcribe, expected_transcribe_duration, do_transcribe)
 
80
  return convert_to_vtt(result)
81
 
82
  def transcribe(file_path):
83
+ audio_data = ffmpeg_read(file_path, 16000)
84
 
85
  # Calculate the length in seconds
86
+ audio_length = len(audio_data) / 16000
87
  expected_transcribe_duration = audio_length / 5.0
88
  gr.Info(f"Starting to transcribe, requesting a GPU for {expected_transcribe_duration} seconds")
89
  return dynamic_gpu_duration(do_transcribe, expected_transcribe_duration, do_transcribe)