我正在使用Interactive Canvas设计Web屏幕。我想从用户在输入框中说出的语音中捕获文本。它类似于functions / index.js中的conv.input.raw
,但我不知道在public / index.html中该做什么。
一旦函数/ index.js中的conv.input.raw
中包含文本,您需要使用interactiveCanvas api将其传递到网站。
conv.ask(new HtmlResponse({
data: {
userEnteredData: conv.input.raw
}
}));
并且从网站上,您将在交互式画布的回调中获得它
interactiveCanvas.ready({
onUpdate(data) {
console.log('user entered text = ', data.userEnteredData);
document.getElementById("textBox").value = data.userEnteredData;
}
});