Artyom.js 中文翻译
  • Artyom
  • FAQ
  • 翻译相关
  • 开始
    • 简介
    • 必要条件
    • Changelog
  • API
    • isObeying
    • addCommands
    • clearGarbageCollection
    • debug
    • detectErrors
    • device
    • emptyCommands
    • fatality
    • getAvailableCommands
    • getLanguage
    • getProperties
    • getVoices
    • initialize
    • isRecognizing
    • isSpeaking
    • newDictation
    • newPrompt
    • obey
    • on
    • recognizingSupported
    • redirectRecognizedTextOutput
    • remoteProcessorService
    • removeCommands
    • repeatLastSay
    • restart
    • say
    • sayRandom
    • setDebug
    • Shutup
    • simulateInstruction
    • speechSupported
    • when
Powered by GitBook
On this page

Was this helpful?

  1. API

restart

使用上一次使用的初始化参数对象重启一个 artyom 实例。

restart方法使用最后一个提供的初始化对象重新启动Artyom使用的默认Webkit语音识别对象。

例子

let artyom = new Artyom();

artyom.initialize({
    lang: "es-ES",
    debug: true,
    continuous: true,
    listen: true
}).then(() => {
    // Say Good Morning in Spanish
    artyom.say("Buenos días !"); 

    // Restart Artyom with the initial configuration after 5 seconds
    setTimeout(() => {


        artyom.restart().then(() => {
            // The default configuration is kept
            // that means spanish mode
            artyom.say("Buenas tardes !");
        });
    }, 5000);
});
PreviousrepeatLastSayNextsay

Last updated 5 years ago

Was this helpful?