Google Translate API text-to-speech: http requests forbidden
I am making a language learning web app that when you hover over the word, it pronounces it for you. I'd like to access the native speaker translations from Google Translate API.
I've found this resource which gives http://translate.google.com/translate_tts
as the base URL and tl
for target language and q
for the query string.
This works awesome when I just access it in the browser,
http://translate.google.com/translate_tts?tl=zh-CN&q=你好, but any httprequests for my app return a 403 Forbidden error.
localhost:~ me$ wget
"http://translate.google.com/translate_tts?ie=UTF-8&tl=en&q=hello+world"
--2015-06-02 11:02:06-- http://translate.google.com/translate_tts?ie=UTF-8&tl=en&q=hello+world
Resolving translate.google.com... 173.194.123.38, 173.194.123.36,
173.194.123.32, ... Connecting to translate.google.com|173.194.123.38|:80... connected. HTTP request
sent, awaiting response... 403 Forbidden 2015-06-02 11:02:07 ERROR
403: Forbidden.
Is there a formal Google API for text-to-speech associated with their payment plans for traditional Google Translate API that I'm just not finding? Or is there a way to get
and play this audio somehow?
javascript google-api text-to-speech http-status-code-403 google-translate
add a comment |
I am making a language learning web app that when you hover over the word, it pronounces it for you. I'd like to access the native speaker translations from Google Translate API.
I've found this resource which gives http://translate.google.com/translate_tts
as the base URL and tl
for target language and q
for the query string.
This works awesome when I just access it in the browser,
http://translate.google.com/translate_tts?tl=zh-CN&q=你好, but any httprequests for my app return a 403 Forbidden error.
localhost:~ me$ wget
"http://translate.google.com/translate_tts?ie=UTF-8&tl=en&q=hello+world"
--2015-06-02 11:02:06-- http://translate.google.com/translate_tts?ie=UTF-8&tl=en&q=hello+world
Resolving translate.google.com... 173.194.123.38, 173.194.123.36,
173.194.123.32, ... Connecting to translate.google.com|173.194.123.38|:80... connected. HTTP request
sent, awaiting response... 403 Forbidden 2015-06-02 11:02:07 ERROR
403: Forbidden.
Is there a formal Google API for text-to-speech associated with their payment plans for traditional Google Translate API that I'm just not finding? Or is there a way to get
and play this audio somehow?
javascript google-api text-to-speech http-status-code-403 google-translate
add a comment |
I am making a language learning web app that when you hover over the word, it pronounces it for you. I'd like to access the native speaker translations from Google Translate API.
I've found this resource which gives http://translate.google.com/translate_tts
as the base URL and tl
for target language and q
for the query string.
This works awesome when I just access it in the browser,
http://translate.google.com/translate_tts?tl=zh-CN&q=你好, but any httprequests for my app return a 403 Forbidden error.
localhost:~ me$ wget
"http://translate.google.com/translate_tts?ie=UTF-8&tl=en&q=hello+world"
--2015-06-02 11:02:06-- http://translate.google.com/translate_tts?ie=UTF-8&tl=en&q=hello+world
Resolving translate.google.com... 173.194.123.38, 173.194.123.36,
173.194.123.32, ... Connecting to translate.google.com|173.194.123.38|:80... connected. HTTP request
sent, awaiting response... 403 Forbidden 2015-06-02 11:02:07 ERROR
403: Forbidden.
Is there a formal Google API for text-to-speech associated with their payment plans for traditional Google Translate API that I'm just not finding? Or is there a way to get
and play this audio somehow?
javascript google-api text-to-speech http-status-code-403 google-translate
I am making a language learning web app that when you hover over the word, it pronounces it for you. I'd like to access the native speaker translations from Google Translate API.
I've found this resource which gives http://translate.google.com/translate_tts
as the base URL and tl
for target language and q
for the query string.
This works awesome when I just access it in the browser,
http://translate.google.com/translate_tts?tl=zh-CN&q=你好, but any httprequests for my app return a 403 Forbidden error.
localhost:~ me$ wget
"http://translate.google.com/translate_tts?ie=UTF-8&tl=en&q=hello+world"
--2015-06-02 11:02:06-- http://translate.google.com/translate_tts?ie=UTF-8&tl=en&q=hello+world
Resolving translate.google.com... 173.194.123.38, 173.194.123.36,
173.194.123.32, ... Connecting to translate.google.com|173.194.123.38|:80... connected. HTTP request
sent, awaiting response... 403 Forbidden 2015-06-02 11:02:07 ERROR
403: Forbidden.
Is there a formal Google API for text-to-speech associated with their payment plans for traditional Google Translate API that I'm just not finding? Or is there a way to get
and play this audio somehow?
javascript google-api text-to-speech http-status-code-403 google-translate
javascript google-api text-to-speech http-status-code-403 google-translate
asked Jun 2 '15 at 15:05
GrowlerGrowler
4,7911266155
4,7911266155
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
That resource is dated. Google deprecated free access to the language translate api. Now an API key is needed. The api is also now in V2.
Without an api key you will receive the 403 forbidden error.
More information here: https://cloud.google.com/translate/docs
2
Thank you. I've looked at their API docs and didn't see any endpoints for getting text-to-speech files. Am I missing that? I'd be willing to pay if I can access the audio. Btw, you still can download the audio from the deprecatedtranslate_tts
URI usingwget -q -U Mozilla -O output.mp3 "http://translate.google.com/translate_tts?ie=UTF-8&tl=en&q=hello+world"
– Growler
Jun 2 '15 at 15:12
@Growler it's not an official api but still takes an api key. You can try get passed it using techniques from here: stackoverflow.com/questions/12883330/…. You're likely to get blocked often once you make requests with over 100 characters.
– Akshat
Jun 2 '15 at 15:14
@Growler I've seen that, you're likely to get blocked using it once Google detects how youre using the requests.
– Akshat
Jun 2 '15 at 15:15
That SO post contains deprecated techniques that I used original when I posted this. The most updated technique there is from weston.ruter.net/2009/12/12/google-tts
– Growler
Jun 2 '15 at 15:18
@Growler that SO post is kept up to date and the link youve mentioned is from that post which still does work.
– Akshat
Jun 2 '15 at 15:19
|
show 5 more comments
You can get anything sound, I found it:
https://translate.google.com.vn/translate_tts?ie=UTF-8&q=ANYTHING_TEXT&tl=en&client=tw-ob
Note: client=tw-ob
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f30599797%2fgoogle-translate-api-text-to-speech-http-requests-forbidden%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
That resource is dated. Google deprecated free access to the language translate api. Now an API key is needed. The api is also now in V2.
Without an api key you will receive the 403 forbidden error.
More information here: https://cloud.google.com/translate/docs
2
Thank you. I've looked at their API docs and didn't see any endpoints for getting text-to-speech files. Am I missing that? I'd be willing to pay if I can access the audio. Btw, you still can download the audio from the deprecatedtranslate_tts
URI usingwget -q -U Mozilla -O output.mp3 "http://translate.google.com/translate_tts?ie=UTF-8&tl=en&q=hello+world"
– Growler
Jun 2 '15 at 15:12
@Growler it's not an official api but still takes an api key. You can try get passed it using techniques from here: stackoverflow.com/questions/12883330/…. You're likely to get blocked often once you make requests with over 100 characters.
– Akshat
Jun 2 '15 at 15:14
@Growler I've seen that, you're likely to get blocked using it once Google detects how youre using the requests.
– Akshat
Jun 2 '15 at 15:15
That SO post contains deprecated techniques that I used original when I posted this. The most updated technique there is from weston.ruter.net/2009/12/12/google-tts
– Growler
Jun 2 '15 at 15:18
@Growler that SO post is kept up to date and the link youve mentioned is from that post which still does work.
– Akshat
Jun 2 '15 at 15:19
|
show 5 more comments
That resource is dated. Google deprecated free access to the language translate api. Now an API key is needed. The api is also now in V2.
Without an api key you will receive the 403 forbidden error.
More information here: https://cloud.google.com/translate/docs
2
Thank you. I've looked at their API docs and didn't see any endpoints for getting text-to-speech files. Am I missing that? I'd be willing to pay if I can access the audio. Btw, you still can download the audio from the deprecatedtranslate_tts
URI usingwget -q -U Mozilla -O output.mp3 "http://translate.google.com/translate_tts?ie=UTF-8&tl=en&q=hello+world"
– Growler
Jun 2 '15 at 15:12
@Growler it's not an official api but still takes an api key. You can try get passed it using techniques from here: stackoverflow.com/questions/12883330/…. You're likely to get blocked often once you make requests with over 100 characters.
– Akshat
Jun 2 '15 at 15:14
@Growler I've seen that, you're likely to get blocked using it once Google detects how youre using the requests.
– Akshat
Jun 2 '15 at 15:15
That SO post contains deprecated techniques that I used original when I posted this. The most updated technique there is from weston.ruter.net/2009/12/12/google-tts
– Growler
Jun 2 '15 at 15:18
@Growler that SO post is kept up to date and the link youve mentioned is from that post which still does work.
– Akshat
Jun 2 '15 at 15:19
|
show 5 more comments
That resource is dated. Google deprecated free access to the language translate api. Now an API key is needed. The api is also now in V2.
Without an api key you will receive the 403 forbidden error.
More information here: https://cloud.google.com/translate/docs
That resource is dated. Google deprecated free access to the language translate api. Now an API key is needed. The api is also now in V2.
Without an api key you will receive the 403 forbidden error.
More information here: https://cloud.google.com/translate/docs
answered Jun 2 '15 at 15:08
AkshatAkshat
59.3k26194256
59.3k26194256
2
Thank you. I've looked at their API docs and didn't see any endpoints for getting text-to-speech files. Am I missing that? I'd be willing to pay if I can access the audio. Btw, you still can download the audio from the deprecatedtranslate_tts
URI usingwget -q -U Mozilla -O output.mp3 "http://translate.google.com/translate_tts?ie=UTF-8&tl=en&q=hello+world"
– Growler
Jun 2 '15 at 15:12
@Growler it's not an official api but still takes an api key. You can try get passed it using techniques from here: stackoverflow.com/questions/12883330/…. You're likely to get blocked often once you make requests with over 100 characters.
– Akshat
Jun 2 '15 at 15:14
@Growler I've seen that, you're likely to get blocked using it once Google detects how youre using the requests.
– Akshat
Jun 2 '15 at 15:15
That SO post contains deprecated techniques that I used original when I posted this. The most updated technique there is from weston.ruter.net/2009/12/12/google-tts
– Growler
Jun 2 '15 at 15:18
@Growler that SO post is kept up to date and the link youve mentioned is from that post which still does work.
– Akshat
Jun 2 '15 at 15:19
|
show 5 more comments
2
Thank you. I've looked at their API docs and didn't see any endpoints for getting text-to-speech files. Am I missing that? I'd be willing to pay if I can access the audio. Btw, you still can download the audio from the deprecatedtranslate_tts
URI usingwget -q -U Mozilla -O output.mp3 "http://translate.google.com/translate_tts?ie=UTF-8&tl=en&q=hello+world"
– Growler
Jun 2 '15 at 15:12
@Growler it's not an official api but still takes an api key. You can try get passed it using techniques from here: stackoverflow.com/questions/12883330/…. You're likely to get blocked often once you make requests with over 100 characters.
– Akshat
Jun 2 '15 at 15:14
@Growler I've seen that, you're likely to get blocked using it once Google detects how youre using the requests.
– Akshat
Jun 2 '15 at 15:15
That SO post contains deprecated techniques that I used original when I posted this. The most updated technique there is from weston.ruter.net/2009/12/12/google-tts
– Growler
Jun 2 '15 at 15:18
@Growler that SO post is kept up to date and the link youve mentioned is from that post which still does work.
– Akshat
Jun 2 '15 at 15:19
2
2
Thank you. I've looked at their API docs and didn't see any endpoints for getting text-to-speech files. Am I missing that? I'd be willing to pay if I can access the audio. Btw, you still can download the audio from the deprecated
translate_tts
URI using wget -q -U Mozilla -O output.mp3 "http://translate.google.com/translate_tts?ie=UTF-8&tl=en&q=hello+world"
– Growler
Jun 2 '15 at 15:12
Thank you. I've looked at their API docs and didn't see any endpoints for getting text-to-speech files. Am I missing that? I'd be willing to pay if I can access the audio. Btw, you still can download the audio from the deprecated
translate_tts
URI using wget -q -U Mozilla -O output.mp3 "http://translate.google.com/translate_tts?ie=UTF-8&tl=en&q=hello+world"
– Growler
Jun 2 '15 at 15:12
@Growler it's not an official api but still takes an api key. You can try get passed it using techniques from here: stackoverflow.com/questions/12883330/…. You're likely to get blocked often once you make requests with over 100 characters.
– Akshat
Jun 2 '15 at 15:14
@Growler it's not an official api but still takes an api key. You can try get passed it using techniques from here: stackoverflow.com/questions/12883330/…. You're likely to get blocked often once you make requests with over 100 characters.
– Akshat
Jun 2 '15 at 15:14
@Growler I've seen that, you're likely to get blocked using it once Google detects how youre using the requests.
– Akshat
Jun 2 '15 at 15:15
@Growler I've seen that, you're likely to get blocked using it once Google detects how youre using the requests.
– Akshat
Jun 2 '15 at 15:15
That SO post contains deprecated techniques that I used original when I posted this. The most updated technique there is from weston.ruter.net/2009/12/12/google-tts
– Growler
Jun 2 '15 at 15:18
That SO post contains deprecated techniques that I used original when I posted this. The most updated technique there is from weston.ruter.net/2009/12/12/google-tts
– Growler
Jun 2 '15 at 15:18
@Growler that SO post is kept up to date and the link youve mentioned is from that post which still does work.
– Akshat
Jun 2 '15 at 15:19
@Growler that SO post is kept up to date and the link youve mentioned is from that post which still does work.
– Akshat
Jun 2 '15 at 15:19
|
show 5 more comments
You can get anything sound, I found it:
https://translate.google.com.vn/translate_tts?ie=UTF-8&q=ANYTHING_TEXT&tl=en&client=tw-ob
Note: client=tw-ob
add a comment |
You can get anything sound, I found it:
https://translate.google.com.vn/translate_tts?ie=UTF-8&q=ANYTHING_TEXT&tl=en&client=tw-ob
Note: client=tw-ob
add a comment |
You can get anything sound, I found it:
https://translate.google.com.vn/translate_tts?ie=UTF-8&q=ANYTHING_TEXT&tl=en&client=tw-ob
Note: client=tw-ob
You can get anything sound, I found it:
https://translate.google.com.vn/translate_tts?ie=UTF-8&q=ANYTHING_TEXT&tl=en&client=tw-ob
Note: client=tw-ob
answered Oct 14 '17 at 3:33
Tan NguyenTan Nguyen
386
386
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f30599797%2fgoogle-translate-api-text-to-speech-http-requests-forbidden%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown