相关疑难解决方法(0)

Google Translate API文字转语音:http请求被禁止

我正在制作一个语言学习网络应用程序,当你将鼠标悬停在单词上时,它会为你发音.我想访问Google Translate API的母语翻译.

我找到了这个资源,它提供http://translate.google.com/translate_tts了基本URL,tl目标语言和q查询字符串.

当我在浏览器中访问它时,这非常有用, http://translate.google.com/translate_tts?tl = zh-CN&q =你好,但我的应用的任何httprequests都会返回403 Forbidden错误.

localhost:~me $ wget" http://translate.google.com/translate_tts?ie=UTF-8&tl=en&q=hello+world "--2015-06-02 11:02:06-- http://翻译.google.com/translate_tts?ie = UTF-8&tl = en&q = hello + world 解析translate.google.com ... 173.194.123.38,173.194.123.36,173.194.123.32,...连接到translate.google.com | 173.194.123.38 |:80 ...连接.发送HTTP请求,等待响应... 403 Forbidden 2015-06-02 11:02:07错误403:禁止.

是否有一个正式的Google API,用于与传统Google Translate API的付款计划相关联的文字转语音,我还没有找到?或者是否有办法以get某种方式播放此音频?

javascript google-api text-to-speech google-translate http-status-code-403

7
推荐指数
2
解决办法
2万
查看次数