From 1e0350d35624492383d66174ef2ceba66f8adc7c Mon Sep 17 00:00:00 2001 From: "E. Almqvist" Date: Tue, 6 Oct 2020 18:43:08 +0200 Subject: [PATCH] Removed unneeded code --- speech/speech.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/speech/speech.py b/speech/speech.py index 6233e9c..f026911 100644 --- a/speech/speech.py +++ b/speech/speech.py @@ -19,9 +19,11 @@ class voiceInput(object): except sr.RequestError as err: print("Unable to request results: {0}".format(err)) + return self.voiceToText(deviceIndex) - except sr.UnknownValueError as err: - print("Unknown Error: {0}".format(err)) + except sr.UnknownValueError: + print("????") + return self.voiceToText(deviceIndex) def setMuted( self, setm: bool=True ):