瀏覽代碼

feat(azure_voice.py): improve error logging in voiceToText method

develop
lanvent 1 年之前
父節點
當前提交
a0cbe9c3e2
共有 1 個檔案被更改,包括 5 行新增1 行删除
  1. +5
    -1
      voice/azure/azure_voice.py

+ 5
- 1
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



Loading…
取消
儲存