diff options
author | YujiSoftware <yuji.software+github@gmail.com> | 2022-03-02 20:22:51 +0900 |
---|---|---|
committer | Irvin <irvinfly@gmail.com> | 2022-03-04 01:03:17 +0800 |
commit | 9a110dee28ae2ef12ee014b98fda6bae6ee48edb (patch) | |
tree | 6525763f4313d7d8f42aefa699765f61ee1c63df /files/zh-cn/web/api/speechrecognitionresult | |
parent | eeddb651b6e8deb8ecabc2bc5bc28c8ead25cca5 (diff) | |
download | translated-content-9a110dee28ae2ef12ee014b98fda6bae6ee48edb.tar.gz translated-content-9a110dee28ae2ef12ee014b98fda6bae6ee48edb.tar.bz2 translated-content-9a110dee28ae2ef12ee014b98fda6bae6ee48edb.zip |
Migrate to Compat macro (zh-cn)
Diffstat (limited to 'files/zh-cn/web/api/speechrecognitionresult')
-rw-r--r-- | files/zh-cn/web/api/speechrecognitionresult/index.html | 74 | ||||
-rw-r--r-- | files/zh-cn/web/api/speechrecognitionresult/isfinal/index.html | 74 |
2 files changed, 2 insertions, 146 deletions
diff --git a/files/zh-cn/web/api/speechrecognitionresult/index.html b/files/zh-cn/web/api/speechrecognitionresult/index.html index c22e5d7da0..eda8c73c98 100644 --- a/files/zh-cn/web/api/speechrecognitionresult/index.html +++ b/files/zh-cn/web/api/speechrecognitionresult/index.html @@ -71,79 +71,7 @@ translation_of: Web/API/SpeechRecognitionResult <h2 id="Browser_compatibility">Browser compatibility</h2> -<div>{{CompatibilityTable}}</div> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari (WebKit)</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatChrome(33)}} <sup>[1]</sup></td> - <td>{{CompatGeckoDesktop(44)}} <sup>[2]</sup></td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Android</th> - <th>Chrome</th> - <th>Firefox Mobile (Gecko)</th> - <th>Firefox OS</th> - <th>IE Phone</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatVersionUnknown}}<sup>[1]</sup></td> - <td>{{CompatUnknown}}</td> - <td>2.5</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - </tr> - </tbody> -</table> -</div> - -<ul> - <li>[1] Speech recognition interfaces are currently prefixed on Chrome, so you'll need to prefix interface names appropriately, e.g. <code>webkitSpeechRecognition</code>; You'll also need to serve your code through a web server for recognition to work.</li> - <li>[2] Can be enabled via the <code>media.webspeech.recognition.enable</code> flag in <a>about:config</a>, although note that currently speech recognition won't work on Desktop Firefox — it will be properly exposed soon, once the required internal permissions are sorted out.</li> -</ul> - -<h3 id="Firefox_OS_permissions">Firefox OS permissions</h3> - -<p>To use speech recognition in an app, you need to specify the following permissions in your <a href="/en-US/docs/Web/Apps/Build/Manifest">manifest</a>:</p> - -<pre class="brush: json">"permissions": { - "audio-capture" : { - "description" : "Audio capture" - }, - "speech-recognition" : { - "description" : "Speech recognition" - } -}</pre> - -<p>You also need a privileged app, so you need to include this as well:</p> - -<pre class="brush: json"> "type": "privileged"</pre> +{{Compat("api.SpeechRecognitionResult")}} <h2 id="See_also">See also</h2> diff --git a/files/zh-cn/web/api/speechrecognitionresult/isfinal/index.html b/files/zh-cn/web/api/speechrecognitionresult/isfinal/index.html index 1b1a46a1d7..18c10d04fa 100644 --- a/files/zh-cn/web/api/speechrecognitionresult/isfinal/index.html +++ b/files/zh-cn/web/api/speechrecognitionresult/isfinal/index.html @@ -58,79 +58,7 @@ translation_of: Web/API/SpeechRecognitionResult/isFinal <h2 id="浏览器兼容性">浏览器兼容性</h2> -<div>{{CompatibilityTable}}</div> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari (WebKit)</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatChrome(33)}} <sup>[1]</sup></td> - <td>{{CompatGeckoDesktop(44)}} <sup>[2]</sup></td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Android</th> - <th>Chrome</th> - <th>Firefox Mobile (Gecko)</th> - <th>Firefox OS</th> - <th>IE Phone</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatVersionUnknown}}<sup>[1]</sup></td> - <td>{{CompatUnknown}}</td> - <td>2.5</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - </tr> - </tbody> -</table> -</div> - -<ul> - <li>[1] 语音识别接口目前是Chrome的前缀, 所以你需要对接口进行添加适当的前缀, 比如, <code>webkitSpeechRecognition</code>; 同时, 你还需要一个来Web服务器来为代码 (API) 服务, 以便识别工作.</li> - <li>[2] 可以通过 <a>about:config</a>(注意, 不同的浏览器会有不同的配置, 比如 chrome 中是 about:flag ) 中 <code>media.webspeech.recognition.enable</code> 标记来启动, 尽管目前的语音识别功能在桌面版 Firefox 浏览器中无法使用 — 一旦解决了所需的内部权限, 它将很快被正确地暴露出来。</li> -</ul> - -<h3 id="Firefox_OS_权限">Firefox OS 权限</h3> - -<p>要在应用程序中使用语音识别,您需要在您的清单中指定以下<a href="/zh-CN/Apps/Build/Manifest">权限</a>:</p> - -<pre class="brush: json">"permissions": { - "audio-capture" : { - "description" : "Audio capture" - }, - "speech-recognition" : { - "description" : "Speech recognition" - } -}</pre> - -<p>你还需要一个有特权的应用程序,所以你也需要把它包含在内:</p> - -<pre class="brush: json"> "type": "privileged"</pre> +{{Compat("api.SpeechRecognitionResult.isFinal")}} <h2 id="相关链接">相关链接</h2> |