Created
February 15, 2016 18:59
-
-
Save primiano/64a1d496c5b3e8683ec5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CORPUS=""" | |
And that this API is only available for help with developing the Chrome/Chromium browser, so if you only joined this mailing list for the API you are probably not allowed to use it... | |
Sorry, no. It is not available for public consumption. | |
The 'Google Speech API' is intended for use by Chromium only; it's not for general public use. That is why there is no documentation and no way to get additional quota. | |
See also https://www.chromium.org/developers/how-tos/api-keys and big yellow box. Search the archives too. | |
Please use a speech API suitable for your platform (e.g. the Web Speech API on the web, or android.speech on Android). | |
message at the top of https://www.chromium.org/developers/how-tos/api-keys | |
Of course if you want to use the Web speech API that's different, there's no limit to that, can be used for anything. | |
https://www.google.com/intl/en/chrome/demos/speech.html / | |
So, just to be clear, your question has nothing to do with Chrome. | |
You're just trying to hit the same webservice that Chrome Desktop uses in a product you're developing. | |
If you log in into the https://console.developers.google.com/ under the APIs page there is an entry for Speech API, which tells you: - The free quota is '50 req/day' - 'The Speech API allows developers to access Google speech-recognition services. It is only available for development and personal use.' | |
Those APIs are not mean to be used for anything else. They're only meant to be used by Chrome and its developers. period. | |
This is doubly wrong: - You get it for free and unlimited, use the web (Web Speech API)! - If you want to use it out of Chrome, you can't get it even if you are willing to pay, as extensively discussed in this mailing list. | |
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: | |
Well, you shouldn't (outside of Chrome). | |
This is intended. The Speech API quota is very low and is intended only for developing / testing custom chromium builds, not for building arbitrary products on top of that. | |
The real problem is trying to use that API in a custom product. | |
This topic have been extensively discussed in this mailing list. Please take a look at the archives, search for 'speech' 'api' in chromium-dev. | |
Quoting: 'To obtain your own API key, simply follow the steps on the API Keys page at the Chromium Developers site. ' | |
Zero. zero seconds. Not a millisecond more. That's the preferred length. Click here to find out how to deal with requests longer than 0s. | |
This mailing list is about chrome development. It is not a general Google WebService help desk. | |
Refer to https://developers.google.com for these kind of requests. | |
You just chose hack some code out of chromium, which was not even marginally meant to be a public API, and base your product on a hack (and probably made money out of that). | |
That is, in my humble opinion, simply a wrong engineering decision. | |
You cannot. This API is only intended for Chrome and development/test purposes with Chromium. | |
Please search the mailing list archives. | |
Please see http://www.chromium.org/developers/how-tos/api-keys; particularly the yellow box at the top. | |
Quick answer is: No, and you should not use speech API for any project other than Chrome. | |
Long answer: https://groups.google.com/a/chromium.org/d/msg/chromium-dev/TJRsxtxkB_Y/jaCX307c1tQJ | |
please do not spam the list. if you want to post a query, do it only once. | |
Do not email chromium-dev for quota questions about the Speech API.' | |
NO | |
NOOOOOOOOOOOO | |
""" | |
import markovify.text | |
text_model = markovify.text.NewlineText(CORPUS) | |
for i in range(2): | |
print(text_model.make_sentence(tries=200)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment