Revised SpeechRecognitionResult

I suggest we add the following fields to the IDL for SpeechRecognitionResult in section 5.1:
        readonly attribute DOMString transcript;
        readonly attribute float confidence;
        readonly attribute any interpretation;

Section 5.1.6 would also need the following additions:
    transcript - Shortcut to the transcript property on the first SpeechRecognitionAlternative (i.e. same value as item[0].transcript).
    confidence - Shortcut to the confidence property on the first SpeechRecognitionAlternative (i.e. same value as item[0]. confidence).
    interpretation - Shortcut to the interpretation property on the first SpeechRecognitionAlternative (i.e. same value as item[0]. interpretation).

Such a scheme carries the requirement that every recognition result has at least one alternative (otherwise index out of bounds).  But given that we already have a way to communicate error results, I think this is OK.  In other words, I can't think of a case where a successful recognition would not contain at least one alternative.

Thanks

Received on Friday, 18 May 2012 19:14:14 UTC