【发布时间】:2015-04-05 01:22:04
【问题描述】:
HTML5 有一个新的语音识别 API,caniuse.com 建议,Safari iOS 7.1 支持这个 API。但是,我已经尝试过了,但它无法在带有 Safari 7.1 或 MAC OS x safari 7.1 的 iOS (iPhone 5S) 上运行。
是否有任何解决方法可以使其在 iOS 和 Android 上运行?此语音识别 API 是否可用于敏感数据,因为它使用 Google 服务 ()。
我试过这个:
<!DOCTYPE html>
<meta charset="utf-8">
<title>Web Speech API Demo</title>
<head>
<script>
function test(){
alert("Called test")
if ('speechSynthesis' in window) {
alert("Synthesis support. Make your web apps talk!");
}
if ('SpeechRecognition' in window) {
alert("Speech recognition support. Talk to your apps!");
}
else{
alert("No support");
}
if (document.createElement('input').webkitSpeech === undefined) {
alert("Nooooo")
// Not supported
} else {
// Supported!
}
}
【问题讨论】:
-
我遇到了同样的问题,因为我从 Safari 中得到错误,它不理解 SpeechRecognition,但它可以进行语音合成。你有什么运气吗?
-
还没有,,..我认为 Safari 还不支持它!
标签: html ios7 safari webspeech-api