Skip to content

Commit

Permalink
feat(azure_voice.py): improve error logging in voiceToText method
Browse files Browse the repository at this point in the history
  • Loading branch information
lanvent committed Apr 18, 2023
1 parent a83e5a9 commit a0cbe9c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion voice/azure/azure_voice.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,11 @@ def voiceToText(self, voice_file):
)
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

Expand Down

0 comments on commit a0cbe9c

Please sign in to comment.