我有一个简单的java脚本程序,我想通过Amazon Echo传输,但是我无法弄清楚如何将一些变量从基于文本转移到语音。例如:
var rhyme = prompt('Enter the word to rhyme with'); //input
console.log('rhyming words API call result:', getNRhymingWords(rhyme, 5)); //output
我已经为字典中的每个单词设置了自定义意图和插槽,但我仍然无法使用该插槽。我打算简单地在函数的开头调用rhyme变量,在结尾处调用输出。 非常感谢任何帮助!