Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -37,7 +37,7 @@ def download_video(url):
|
|
37 |
return video_file
|
38 |
|
39 |
def word_level_transcribe(audio, max_segment_duration=2.0): # Set your desired max duration here
|
40 |
-
model = WhisperModel("
|
41 |
segments, info = model.transcribe(audio, vad_filter=True, vad_parameters=dict(min_silence_duration_ms=1500), word_timestamps=True, log_progress=True)
|
42 |
segments = list(segments) # The transcription will actually run here.
|
43 |
wordlevel_info = []
|
|
|
37 |
return video_file
|
38 |
|
39 |
def word_level_transcribe(audio, max_segment_duration=2.0): # Set your desired max duration here
|
40 |
+
model = WhisperModel("small", device="cpu")
|
41 |
segments, info = model.transcribe(audio, vad_filter=True, vad_parameters=dict(min_silence_duration_ms=1500), word_timestamps=True, log_progress=True)
|
42 |
segments = list(segments) # The transcription will actually run here.
|
43 |
wordlevel_info = []
|