这是
实验性技术
检查
浏览器兼容性表格
要小心谨慎在生产中使用这之前。
serviceURI
特性为
SpeechRecognition
interface specifies the location of the speech recognition service used by the current
SpeechRecognition
to handle the actual recognition. The default is the user agent's default speech service.
var myServiceURI = mySpeechRecognition.serviceURI; mySpeechRecognition.serviceURI = 'path/to/my/service/';
A
DOMString
representing the URI of the speech recognition service.
var recognition = new SpeechRecognition(); recognition.serviceURI = 'http://www.example.com'; ...
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
serviceURI
弃用
非标
|
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"
SpeechRecognition