<html>
<head>
<script>
function echoSpeakContent(){
var objVal = document.getElementById('speakInput').value;
alert(objVal);
}
</script>
<title>html5-speaking</title>
</head>
<body>
<input x-webkit-speech x-webkit-grammar="bUIltin:search" lang="zh-CN" onwebkitspeechchange="echoSpeakContent();" id="speakInput"/>
</body>
</html>
在Chrome中的效果如下