legusxyz commited on
Commit
20e96b8
·
verified ·
1 Parent(s): b9cd341

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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) # Call the ASR pipeline
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