Update app.py
Browse files
app.py
CHANGED
@@ -27,9 +27,9 @@ async def transcribe_audio(file: UploadFile = File(...)):
|
|
27 |
temp_audio_file.write(await file.read())
|
28 |
temp_file_path = temp_audio_file.name
|
29 |
|
30 |
-
# Transcribe the audio
|
31 |
transcription_start = time.time()
|
32 |
-
transcription = asr_pipeline(temp_file_path) #
|
33 |
transcription_end = time.time()
|
34 |
|
35 |
# Clean up temporary file after use
|
|
|
27 |
temp_audio_file.write(await file.read())
|
28 |
temp_file_path = temp_audio_file.name
|
29 |
|
30 |
+
# Transcribe the audio with long-form generation enabled
|
31 |
transcription_start = time.time()
|
32 |
+
transcription = asr_pipeline(temp_file_path, return_timestamps=True) # Enable timestamp return for long audio files
|
33 |
transcription_end = time.time()
|
34 |
|
35 |
# Clean up temporary file after use
|