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

isSpeaking

判断 artyom 是否正在说话

该函数将会告知你 artyom 是否于当前时刻正在合成文本

使用方式

if(artyom.isSpeaking()){
    console.log("Artyom is speaking something");
}else{
    console.log("Artyom is not speaking anything");
}

例子

artyom.say("Hey, a test text that i will read. Probably it doesn't make sense, therefore i will say the same twice.Hey, a test text that i will read. Probably it doesn't make sense, therefore i will say the same twice.",{
    onStart:function(){
        setTimeout(function(){
            // Most likely to be true
            console.log("Speaking : "+ artyom.isSpeaking().toString());
        },500);
    },
    onEnd: function(){
        setTimeout(function(){
            // Most likely to be false
            console.log("Speaking : "+ artyom.isSpeaking().toString());
        },500);
    }
});
PreviousisRecognizingNextnewDictation

Last updated 5 years ago

Was this helpful?