【发布时间】:2020-01-01 08:28:59
【问题描述】:
问题
我有一个 Google Actions SDK 项目,我正在使用 nodejs client library 来构建实现。我在尝试使用 Confirmation Helper 意图时遇到了一些问题。它覆盖了之前给出的响应。让我给你一个问题的简化例子:
- 首先,Action 说:“嗨,希望你今天过得愉快”
- 然后,Action 要求确认,“你想要今天的天气预报吗?”
但在模拟器中,我听到的只是第二个问题。我的目标是仅限语音的情况,所以我真的需要所有的回应。有趣的是,我可以在模拟器的AUDIO 选项卡中看到所有响应。我怎么能听到这两个短语?
我正在复制/粘贴响应 JSON,如 RESPONSE 选项卡中所示。
{
"expectUserResponse": true,
"expectedInputs": [
{
"possibleIntents": [
{
"intent": "actions.intent.CONFIRMATION",
"inputValueData": {
"@type": "type.googleapis.com/google.actions.v2.ConfirmationValueSpec",
"dialogSpec": {
"requestConfirmationText": "Do you want today's weather report?"
}
}
}
],
"inputPrompt": {
"richInitialPrompt": {
"items": [
{
"simpleResponse": {
"textToSpeech": "Hope you are doing well!"
}
}
]
}
}
}
],
"conversationToken": ""
}
我该如何解决这种情况。谢谢!
【问题讨论】:
标签: actions-on-google google-assistant-sdk