【问题标题】:Alexa Skill - How can I reprompt to my user that he has to use it again, if he is not saying stop?Alexa Skill - 如果他没有说停止,我如何向我的用户再次提示他必须再次使用它?
【发布时间】:2018-06-18 14:27:56
【问题描述】:

我想为 Alexa 发布我的技能。尽管如此,我的会话有问题,并重新提示用户可以继续玩。

这里是反馈:

“3.技能完成任务后,会话保持打开状态,不提示用户。技能完成请求后,如果不提示用户输入,则必须关闭会话。”

function getFactResponse(callback) {

//get random index from array of data
var index = getRandomInt(Object.keys(neverData).length -1);

// If we wanted to initialize the session to have some attributes we could add those here.
const sessionAttributes = {};

//Get card title from data
const cardTitle = neverData[index];

//Get output from data
const speechOutput = neverData[index];
// If the user either does not reply to the welcome message or says something that is not
// understood, they will be prompted again with this text.
const repromptText = 'Just say it again if you want to play' ;
const shouldEndSession = false;
callback(sessionAttributes,
    buildSpeechletResponse(cardTitle, speechOutput, repromptText, 
shouldEndSession));
}

当我将 shouldEndSession 设置为 true 时,它​​不起作用,因为 Alexa 正在结束会话并且玩家必须再次开始该技能,但情况并非如此。我希望你能帮助我:)

可以

【问题讨论】:

    标签: javascript node.js alexa alexa-skills-kit


    【解决方案1】:

    鉴于反馈指定“会话保持打开状态,没有向用户提示”,这表明在您对用户的回复中,没有提出任何问题。

    根据亚马逊的Detailed Certification Checklists,只有在您期待用户反馈时,会话才应保持打开状态:

    向用户提出问题的每个响应后,会话保持打开状态,设备等待您的响应。

    根据经验,即使没有问题也可以提示用户。

    因此,如果您希望会话保持打开状态,解决问题的一种简单方法可能是将您当前的重新提示包含在语音输出中。这会提醒用户知道他们可以说些什么来开始新游戏。显然,您必须包含另一个略有不同的重新提示。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-08-04
      • 2011-05-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-09-03
      相关资源
      最近更新 更多