SpeechRecognition: processLocally property
Experimental:This is anexperimental technology
Check theBrowser compatibility table carefully before using this in production.
TheprocessLocally property of theSpeechRecognition interface specifies whether speech recognition must be performed locally on the user's device.
SeeOn-device speech recognition for more information.
In this article
Value
A boolean value.
- If set to
true, speech recognition done via theSpeechRecognitionobject must be done locally. - If set to
false(the default), the user agent can choose whether to do the processing locally or remotely.
Examples
>Basic usage
The following code creates a newSpeechRecognition object instance using theSpeechRecognition() constructor, then specifies that it should use local processing by settingprocessLocally totrue:
js
const recognition = new SpeechRecognition();recognition.processLocally = true;This code is excerpted from ouron-device speech color changer (run the demo live). SeeUsing the Web Speech API for a full explanation.
Specifications
| Specification |
|---|
| Web Speech API> # dom-speechrecognition-processlocally> |