Skip to content

Commit

Permalink
Merge pull request #478 from sw1313/feature/segments-check
Browse files Browse the repository at this point in the history
Handle empty segment exception case
  • Loading branch information
jhj0517 authored Jan 25, 2025
2 parents 2b5bf55 + 93d8f00 commit cae0267
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modules/whisper/base_transcription_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,10 @@ def run(self,
add_timestamp=add_timestamp
)

if not result:
logger.info(f"Whisper did not detected any speech segments in the audio.")
result = [Segment()]

progress(1.0, desc="Finished.")
total_elapsed_time = time.time() - start_time
return result, total_elapsed_time
Expand Down

0 comments on commit cae0267

Please sign in to comment.