首页 文章

Alexa Skill - 如果他不说停止,我该如何重新向用户说明他必须再次使用它?

提问于
浏览
0

我想发布我的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正在结束会话并且玩家必须再次启动该技能,而事实并非如此 . 我希望你能帮助我:)

能够

1 回答

  • 0

    鉴于反馈指定“会话保持打开而没有提示用户”,它表明在您对用户的回复中,没有问题 .

    根据亚马逊的Detailed Certification Checklists,如果您期待用户反馈,会话应该保持开放:

    在向用户询问问题的每个响应之后,会话保持打开状态,设备等待您的响应 .

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

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

相关问题