过时
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.
interpretation
只读特性在
SpeechRecognitionEvent
interface returns the semantic meaning of what the user said.
This might be determined, for instance, through the SISR specification of semantics in a grammar (see Semantic Interpretation for Speech Recognition (SISR) Version 1.0 for specification and examples.)
var myInterpretation = event.interpretation;
The returned value can be of any type. If no semantic interpretation has been returned by the speec recognition system,
null
将被返回。
recognition.onresult = function(event) {
var color = event.results[0][0].transcript;
diagnostic.textContent = 'Result received: ' + color + '.';
bg.style.backgroundColor = color;
console.log(event.interpretation);
}
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
interpretation
弃用
非标
|
Chrome
33
Prefixed
|
Edge
≤79
Prefixed
|
Firefox No | IE No | Opera No | Safari No |
WebView Android
Yes
Prefixed
|
Chrome Android
Yes
Prefixed
|
Firefox Android No | Opera Android No | Safari iOS No |
Samsung Internet Android
Yes
Prefixed
|
完整支持
不支持
实验。期望将来行为有所改变。
非标。预期跨浏览器支持较差。
弃用。不要用于新网站。
见实现注意事项。
要求使用供应商前缀或不同名称。
To use speech recognition in an app, you need to specify the following permissions in your manifest :
"permissions": {
"audio-capture" : {
"description" : "Audio capture"
},
"speech-recognition" : {
"description" : "Speech recognition"
}
}
You also need a privileged app, so you need to include this as well:
"type": "privileged"
SpeechRecognitionEvent
emma
interpretation
resultIndex
结果