W3C home > Mailing lists > Public > public-speech-api@w3.org > May 2012

Re: Revised SpeechRecognitionResult

From: Hans Wennborg <hwennborg@google.com>
Date: Tue, 22 May 2012 14:00:49 +0100
Message-ID: <CAB8jPhcZEtPvxwvb4Sf+E35ec9NhyZMTKM34a=uTMhHrLBsq1Q@mail.gmail.com>
To: "Young, Milan" <Milan.Young@nuance.com>
Cc: "public-speech-api@w3.org" <public-speech-api@w3.org>
On Fri, May 18, 2012 at 8:13 PM, Young, Milan <Milan.Young@nuance.com> wrote:
> 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).

This sounds pretty reasonable.

> 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.

The 'nomatch' and 'resultdeleted' events also use the
SpeechRecognitionResult interface, and at least for 'nomatch', there
won't be any alternatives. I guess one solution would be to have the
'transcript', 'confidence', and 'interpretation' fields return null
(or throw?) in that case?

Thanks,
Hans
Received on Tuesday, 22 May 2012 13:02:04 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 22 May 2012 13:02:10 GMT