Skip to content

Added option to force continuous or non-continuous mode

Compare
Choose a tag to compare
@TalAter TalAter released this 24 Nov 19:54
· 437 commits to master since this release

You can now pass an optional parameter when starting annyang, to force it to run in continuous or non-continuous mode. When turning continuous mode off, speech recognition will stop as soon as the user stops talking (i.e. only picking up his first sentence).

// Start listening, don't restart automatically
// stop recognition after first phrase recognized
annyang.start({ autoRestart: false, continuous: false });

💡 annyang is pretty smart about guessing when to use continuous mode in order to compensate for issues in webkitSpeechRecognition, as well as for secure and non-secure connections. So, unless you know your application must have continuous mode off, I suggest leaving it at default and simply calling annyang.abort() when you want to stop listening.

This contribution comes from @KeanW, who is building an awesome VR headset for Autodesk powered by annyang!

VR voice controlled headset