PSA: Small patch to support Web Speech API serviceURI param in blink

155 views
Skip to first unread message

kir...@google.com

unread,
Jun 2, 2015, 4:48:20 PM6/2/15
to blin...@chromium.org
Hello,

Just a heads up, we are working on adding support for Web Speech API serviceURI param to send parameters to speech recognizer, as outlined in crbug.com/480516 as implemented in https://codereview.chromium.org/1034833002 and pending https://codereview.chromium.org/1117383002
Our plan is to NOT throw an exception for any malformed strings/urls, and thus there will be no web observable behavior.

Any feedback is welcome.

Thanks,
Kirti

PhistucK

unread,
Jun 3, 2015, 12:45:02 AM6/3/15
to kir...@google.com, blink-dev
I see that it should be a full URL, not only "parameters", right?
I mean, it looks like (in the specification) when you specify this, Chrome should use this URL instead of its own speech service URL entirely.


PhistucK

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

Jochen Eisinger

unread,
Jun 3, 2015, 6:42:38 AM6/3/15
to PhistucK, kir...@google.com, esp...@chromium.org, blink-dev
+Elliott Sprehn who commented on the CL

Kirti Agarwal

unread,
Jun 3, 2015, 11:26:11 AM6/3/15
to Jochen Eisinger, PhistucK, esp...@chromium.org, blink-dev
+Glen

Response inline.


Kirti Agarwal | Software Engineer | kir...@google.com | 212-565-6600


On 3 June 2015 at 06:42, Jochen Eisinger <joc...@chromium.org> wrote:
+Elliott Sprehn who commented on the CL

On Wed, Jun 3, 2015 at 6:45 AM PhistucK <phis...@gmail.com> wrote:
I see that it should be a full URL, not only "parameters", right?
I mean, it looks like (in the specification) when you specify this, Chrome should use this URL instead of its own speech service URL entirely.

I think the plan was to strip out the parameters and send it to the default speech engine, for now. 

Glen, Can you please advise if there's a scenario where serviceURI could be used to pass in a full url.  

Kirti Agarwal

unread,
Jun 3, 2015, 11:28:48 AM6/3/15
to Jochen Eisinger, Glen Shires, PhistucK, esp...@chromium.org, blink-dev
Actually adding Glen this time. :-)


Kirti Agarwal | Software Engineer | kir...@google.com | 212-565-6600


Glen Shires

unread,
Jun 3, 2015, 12:34:50 PM6/3/15
to Kirti Agarwal, Jochen Eisinger, PhistucK, esp...@chromium.org, blink-dev
Yes, as Jochen said, the current plan "is to strip out the parameters and send it to the default speech engine, for now", and this is the current implementation in the two pending CLs that Kirti refers to below. The "chrome://speech-recognition" prefix is used to ensure the namespace does not conflict with any other future implementations.

The spec refers to the serviceURI as a "generic URI" and describes various ways that the user-agent can implement it. I believe that implementing this behavior within the "chrome://speech-recognition" method/domain is conformant with the spec.

I also agree that a user-agent can implement a "full URL" (such as https://example.com ) and remain conformant with the spec. However the spec does not define the protocol between the user-agent and server, so implementing this does not provide a useful feature today. (However, the spec contains an "Editor's Note that refers to potential future definition work, possibly using WebRTC, at which point a "full URL" may be useful.) Also, there may be security considerations as well.

In any case, Kirti's proposed change does not affect this (that is, Chrome doesn't currently implement a "full URL", but it could implement a "full URL" sometime in the future).

Elliott Sprehn

unread,
Jun 3, 2015, 12:47:09 PM6/3/15
to Glen Shires, Kirti Agarwal, Jochen Eisinger, PhistucK, blink-dev
Why not spec the extra parameters as actual parameters and not this "url" so other browsers could implement the features?

serviceURI is just a backdoor for sending parameters to our speech engine without having to standardize them. Realistically this means Microsoft or someone else is going to have to reverse engineer it and then we'll be stuck with chrome://speech-recognition urls forever in all browsers just like multiple browsers that aren't webkit support webkit prefixes.

Dimitri Glazkov

unread,
Jun 3, 2015, 1:04:28 PM6/3/15
to Elliott Sprehn, Glen Shires, Kirti Agarwal, Jochen Eisinger, PhistucK, blink-dev
We should probably treat this as intent to ship and discuss at API owners meeting.

:DG<

Anne van Kesteren

unread,
Jun 5, 2015, 6:47:58 PM6/5/15
to kir...@google.com, blink-dev
On Wed, Jun 3, 2015 at 5:48 AM, <kir...@google.com> wrote:
> Our plan is to NOT throw an exception for any malformed strings/urls, and
> thus there will be no web observable behavior.

This might be moot per Elliott's comment, but I thought I'd point out
that normal behavior is to throw for invalid URLs (URLs that cannot be
parsed).

Also, new APIs should not use the term "URI".


--
https://annevankesteren.nl/

Dimitri Glazkov

unread,
Jun 9, 2015, 2:17:40 PM6/9/15
to Elliott Sprehn, Glen Shires, Kirti Agarwal, Jochen Eisinger, PhistucK, blink-dev
I'll try to help Glen/Kirti with this. Stay tuned.

:DG<
Reply all
Reply to author
Forward
0 new messages