Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -104,7 +104,7 @@ def transcribe(audio_path, model_name):
|
|
104 |
audio = mp.AudioFileClip(audio_path)
|
105 |
audio_duration = audio.duration
|
106 |
print(str(time.time())+' start pipe ')
|
107 |
-
text = pipe(audio_path, batch_size=BATCH_SIZE, generate_kwargs={"task": "transcribe"
|
108 |
end_time = time.time() # Record the end time
|
109 |
|
110 |
transcription_time = end_time - start_time # Calculate the transcription time
|
|
|
104 |
audio = mp.AudioFileClip(audio_path)
|
105 |
audio_duration = audio.duration
|
106 |
print(str(time.time())+' start pipe ')
|
107 |
+
text = pipe(audio_path, batch_size=BATCH_SIZE, generate_kwargs={"task": "transcribe"}, return_timestamps=True)["text"]
|
108 |
end_time = time.time() # Record the end time
|
109 |
|
110 |
transcription_time = end_time - start_time # Calculate the transcription time
|