From a0cbe9c3e2eedad6ce286061eb0ebadb748f9111 Mon Sep 17 00:00:00 2001 From: lanvent Date: Wed, 19 Apr 2023 00:55:22 +0800 Subject: [PATCH] feat(azure_voice.py): improve error logging in voiceToText method --- voice/azure/azure_voice.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/voice/azure/azure_voice.py b/voice/azure/azure_voice.py index 8b45a87..3ee9504 100644 --- a/voice/azure/azure_voice.py +++ b/voice/azure/azure_voice.py @@ -66,7 +66,11 @@ class AzureVoice(Voice): ) reply = Reply(ReplyType.TEXT, result.text) else: - logger.error("[Azure] voiceToText error, result={}".format(result)) + logger.error( + "[Azure] voiceToText error, result={}, canceldetails={}".format( + result, result.cancellation_details + ) + ) reply = Reply(ReplyType.ERROR, "抱歉,语音识别失败") return reply