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