initialize
artyom 的 initialization 函数是在web项目中创建语音助手的关键。
重要
window.onload = function(){
var artyom = new Artyom();
artyom.initialize({
lang:"en-GB",
debug:true,
continuous:true,
listen:true
}).then(function(){
console.log("Artyom has been correctly initialized");
console.log("The following array shouldn't be empty" , artyom.getVoices());
}).catch(function(){
console.error("An error occurred during the initialization");
});
};初始化对象(I put the original table here, avoid misunderstanding)
以持续模式启动artyom
以单条命令的模式启动 artyom
检查初始化流程的结果
使用 obeyKeyword
Last updated
Was this helpful?