Spaces:
Paused
Paused
Update app.py
Browse files
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=
|
| 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:
|