SPACERUNNER99 commited on
Commit
ac14dfb
·
verified ·
1 Parent(s): 220bcbd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -40,8 +40,8 @@ def extract_audio(input_video_name):
40
  return mp3_file
41
 
42
  def transcribe(audio, max_segment_duration=2.0): # Set your desired max duration here
43
- model = WhisperModel("tiny", device="cpu)
44
- segments, info = model.transcribe(audio, vad_filter=True, vad_parameters=dict(min_silence_duration_ms=1500), word_timestamps=True)
45
  segments = list(segments) # The transcription will actually run here.
46
  wordlevel_info = []
47
  for segment in segments:
 
40
  return mp3_file
41
 
42
  def transcribe(audio, max_segment_duration=2.0): # Set your desired max duration here
43
+ model = WhisperModel("tiny", device="cpu")
44
+ segments, info = model.transcribe(audio, vad_filter=True, vad_parameters=dict(min_silence_duration_ms=1000), word_timestamps=True)
45
  segments = list(segments) # The transcription will actually run here.
46
  wordlevel_info = []
47
  for segment in segments: