From f11b15fdfb29fb2f8274dae83db5909558012d1f Mon Sep 17 00:00:00 2001 From: Michael Hansen Date: Wed, 29 Mar 2023 13:04:28 -0500 Subject: [PATCH] Handle broken pipe error in silero --- programs/vad/silero/bin/silero_speech_prob.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programs/vad/silero/bin/silero_speech_prob.py b/programs/vad/silero/bin/silero_speech_prob.py index 9cfded5..f992fbe 100755 --- a/programs/vad/silero/bin/silero_speech_prob.py +++ b/programs/vad/silero/bin/silero_speech_prob.py @@ -33,7 +33,7 @@ def main() -> None: speech_probability = detector.get_speech_probability(chunk) print(speech_probability, flush=True) chunk = sys.stdin.buffer.read(bytes_per_chunk) - except KeyboardInterrupt: + except (KeyboardInterrupt, BrokenPipeError): pass