Re: Concatenating transcript results

Stripping whitespace is something that almost every app that doesn't use
the API for dictation would need. To me this looks like an optional
feature, something which gets turned on based on a flag such as
"SpeechRecognition.autoWhiteSpace" that the developer would set if they
want it.. and as such it could be added in a future revision of the API if
we see developers asking for it.

Cheers
Satish


On Thu, Aug 30, 2012 at 9:48 PM, Glen Shires <gshires@google.com> wrote:

> Inserting whitespace is non-trivial, particularly when considering
> punctuation and internationalization. Some punctuation is placed before the
> whitespace, others after. Some languages don't use whitespace. I'd prefer
> to avoid placing this burden on the JavaScript author.  Speech recognition
> engines already contain this logic.
>
> Conversely, stripping leading and trailing whitespace is trivial, as is
> writing a comparison routine that ignores whitespace.
>
>
> On Thu, Aug 30, 2012 at 1:35 PM, Young, Milan <Milan.Young@nuance.com>wrote:
>
>>  I prefer Satish’s suggestion.  If the web author needs to concatenate,
>> sandwiching in some whitespace seems like a trivial adjustment.****
>>
>> ** **
>>
>> ** **
>>
>> *From:* Satish S [mailto:satish@google.com]
>> *Sent:* Thursday, August 30, 2012 1:28 PM
>> *To:* Glen Shires
>> *Cc:* public-speech-api@w3.org
>> *Subject:* Re: Concatenating transcript results****
>>
>> ** **
>>
>> We could also say the transcript should not include leading or trailing
>> spaces, so the web app should always use a whitespace if it needs to
>> concatenate.  This would work better for apps that check the transcript
>> with known words (e.g. command and control) instead of having to
>> append/prepend whitespaces to their string literals. Also depending on the
>> language of the recognized text whitespace may not be appropriate (e.g. CJK
>> don't use white spaces).****
>>
>>
>> Cheers
>> Satish
>>
>> ****
>>
>> On Thu, Aug 30, 2012 at 6:11 PM, Glen Shires <gshires@google.com> wrote:*
>> ***
>>
>> If there's no disagreement by the end of the week I'll add it to the
>> spec...****
>>
>> ** **
>>
>> On Wed, Aug 29, 2012 at 9:36 AM, Glen Shires <gshires@google.com> wrote:*
>> ***
>>
>> I propose adding the following sentence to the definition
>> of SpeechRecognitionAlternative.transcript to make it clear that a
>> JavaScript author can simply concatenate SpeechRecognitionResults without
>> the author having to worry about where/when to add whitespace.****
>>
>> ** **
>>
>> "For continuous recognition, whitespace MUST be included in the
>> transcript, including leading or trailing whitespace, as necessary such
>> that concatenation of consecutive SpeechRecognitionResults produces a
>> proper transcript of the session."****
>>
>> ** **
>>
>> ** **
>>
>
>

Received on Thursday, 30 August 2012 23:04:48 UTC