Speech API question

已查看 413 次
跳至第一个未读帖子

pinguin jkeke

未读,
2015年4月14日 04:13:272015/4/14
收件人 chromi...@chromium.org
Trying to make speech api work.
I'm trying to access it via browser with AJAX POST.
        $.ajax({
            method: 'POST',
            data: audioData,
            contentType: 'audio/x-flac; rate=44100',
            success: function(data) {
                console.log(data);
            },
            error: function(error, er, err) {
                console.log(err);
            }
        });

Google Chrome browser console output:
bitrix.onvolga.com/:1 XMLHttpRequest cannot load http://www.google.com/speech-api/v2/recognize?key=MY_KEY&output=json&lang=ru-ru. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://bitrix.onvolga.com' is therefore not allowed access. The response had HTTP status code 405.

Mozilla Firefox throwing error about CORS with google page inside, which says:
<p><b>400.</b> <ins>That’s an error.</ins>
<p>Your client has issued a malformed or illegal request. Content-Type should be of the form: audio/xxx; rate=yyy <ins>That’s all we know.</ins>


I can't understand this. I placed contentType tag.

Using jQuery 1.11.2. Using server-key with all IPs allowed. Tried browser key with no success.

Bernhard Bauer

未读,
2015年4月14日 05:00:422015/4/14
收件人 yaav...@gmail.com、chromi...@chromium.org、Primiano Tucci
Have you tried greasing up the mold a bit before putting the dough in? I find that without it, even with silicon molds, after the first couple of batches the muffins just tend to stick to the mold (and subsequently break when trying to get them out).

Hope that helps!
Bernhard.

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

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

Primiano Tucci

未读,
2015年4月14日 07:17:312015/4/14
收件人 Bernhard Bauer、yaav...@gmail.com、Chromium-dev
> Trying to make speech api work.
> I'm trying to access it via browser with AJAX POST
This is the actual problem. Do not try to attempt to interface directly to the webservice.
The reason has been explained in this ML in a variety of occasions, times, languages and moon phases. Please take a look to the archives

Using jQuery 1.11.2.
This is curious. If you are running JS in a browser, you could just use the Web Speech API
This feels as if you are doing an XHR and then parsing HTML in JS to render its contents in a canvas.... instead of just using an <iframe>

pinguin jkeke

未读,
2015年4月14日 07:35:182015/4/14
收件人 chromi...@chromium.org、bau...@chromium.org、yaav...@gmail.com
Web Speech API is only available in Chromium or Chrome.  I need this functionality in FF. That's why i'm trying to POST recorded sounds.

вторник, 14 апреля 2015 г., 14:17:31 UTC+3 пользователь Primiano Tucci написал:

Primiano Tucci

未读,
2015年4月14日 09:09:232015/4/14
收件人 yaav...@gmail.com、Bernhard Bauer、Chromium-discuss
Moving to chromium-discuss as this is OT and not related with Chrome development.

> I need this functionality in FF. That's why i'm trying to POST recorded sounds.

Trying to hack around with a web service that is explicitly designed to be accessed by Chrome is not going to help.
I hoped that the ML archives were clear enough.
1) Bureaucratically: It's a violation of TOS. See https://www.chromium.org/developers/how-tos/api-keys
2) In practice: you can't get any API key with more than 15 requests per day.

You might have better luck on Mozilla following this discussion:

pinguin jkeke

未读,
2015年4月14日 09:30:572015/4/14
收件人 chromi...@chromium.org、yaav...@gmail.com、bau...@chromium.org、chromium...@chromium.org


вторник, 14 апреля 2015 г., 16:09:23 UTC+3 пользователь Primiano Tucci написал:
It's not working even with Google Chrome browser.  

Thiago Farina

未读,
2015年4月14日 09:37:182015/4/14
收件人 yaav...@gmail.com、Bernhard Bauer、chromium...@chromium.org
Please keep chromium-dev on bcc!
--
Thiago Farina

Яна Михайленко

未读,
2015年7月6日 11:04:232015/7/6
收件人 chromi...@chromium.org
Hi All,

Have you been able to solve this issue? I'm facing it now and do not have a solution. Could you please share your solution?

Thanks,
Yana

вторник, 14 апреля 2015 г., 11:13:27 UTC+3 пользователь pinguin jkeke написал:

Primiano Tucci

未读,
2015年7月6日 11:09:092015/7/6
收件人 ymiha...@gmail.com、Chromium-dev
17 other people tried to use Google Speech API outside of chromium the last month.

--
回复全部
回复作者
转发
0 个新帖子