【发布时间】:2016-06-24 15:36:07
【问题描述】:
我正在使用语音识别 API,但每次完成后我都无法检索结果。
这是我正在使用的一段代码:
var recognition = new webkitSpeechRecognition();
recognition.continuous = true;
recognition.interimResults = true;
recognition.onresult = function(event)
{
console.log(event)
}
此输出(在控制台中):
bubbles: false
cancelBubble: false
cancelable: false
clipboardData: undefined
currentTarget: SpeechRecognition
defaultPrevented: false
emma: null
eventPhase: 0
interpretation: null
path: NodeList[0]
resultIndex: 0
results: SpeechRecognitionResultList
returnValue: true
srcElement: SpeechRecognition
target: SpeechRecognition
timeStamp: 1408325350996
type: "result"
__proto__: SpeechRecognitionEvent
我就是想不通。如何检索结果?
【问题讨论】:
标签: javascript html speech-recognition