Skip to content

Commit

Permalink
Handle empty speech error
Browse files Browse the repository at this point in the history
  • Loading branch information
jhj0517 committed Jan 3, 2025
1 parent 6e1d0e6 commit f310f05
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/whisper/base_transcription_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ def run(self,
segments=result,
speech_chunks=speech_chunks,
)
if not result:
raise ValueError("VAD detected no speech segments in the audio.")

if diarization_params.is_diarize:
result, elapsed_time_diarization = self.diarizer.run(
Expand Down

0 comments on commit f310f05

Please sign in to comment.