t
All checks were successful
Deploy WebSocket Server / deploy (push) Successful in 4s

This commit is contained in:
jeremygan2021
2026-03-05 21:47:22 +08:00
parent 64ff8ffbd4
commit ca79b41694
2 changed files with 5 additions and 1 deletions

View File

@@ -1,2 +1,2 @@
DASHSCOPE_API_KEY=sk-a294f382488d46a1aa0d7cd8e750729b DASHSCOPE_API_KEY=sk-a294f382488d46a1aa0d7cd8e750729b
volcengine_API_KEY=db1f8b60-0ffc-473c-98da-40daa3a95df8 volcengine_API_KEY=db1f8b60-0ffc-473c-98da-40daa3a95df8

View File

@@ -462,6 +462,10 @@ class MyRecognitionCallback(RecognitionCallback):
except Exception as e: except Exception as e:
print(f"Failed to send final ASR result: {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: def on_event(self, result: RecognitionResult) -> None:
if result.get_sentence(): if result.get_sentence():
text = result.get_sentence()['text'] text = result.get_sentence()['text']