This commit is contained in:
@@ -462,6 +462,10 @@ class MyRecognitionCallback(RecognitionCallback):
|
||||
except Exception as e:
|
||||
print(f"Failed to send final ASR result: {e}")
|
||||
|
||||
def on_error(self, result: RecognitionResult) -> None:
|
||||
print(f"ASR Error: {result}")
|
||||
|
||||
|
||||
def on_event(self, result: RecognitionResult) -> None:
|
||||
if result.get_sentence():
|
||||
text = result.get_sentence()['text']
|
||||
|
||||
Reference in New Issue
Block a user