Java 谷歌语音识别 API

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/23996399/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-14 09:37:25  来源:igfitidea点击:

Java Google Speech Recognition API

javaapigoogle-apispeech-recognitionspeech-to-text

提问by Carlos Espeleta

I developed a Java Application that used Google Speech Recognition, but from few days/weeks ago it doesn't work, i'm receiving this message.

我开发了一个使用 Google 语音识别的 Java 应用程序,但几天/几周前它不起作用,我收到了这条消息。

java.io.IOException: Server returned HTTP response code: 403

java.io.IOException:服务器返回 HTTP 响应代码:403

I saw a little bit information about what is happening in this Post.

我在这篇文章中看到了一些关于正在发生的事情的信息。

After that, i registered in https://console.developers.google.comand then i'm trying to use the following URL and i'm having the same response.

之后,我在https://console.developers.google.com 中注册,然后我尝试使用以下 URL,但得到了相同的响应。

https://www.google.com/speech-api/v2/recognize?output=json&lang=es-EN&key=MY_KEY

https://www.google.com/speech-api/v2/recognize?output=json&lang=es-EN&key=MY_KEY

Furthermore, in the console developers i'm not seeing in any place some API that it's called speech recognition or similar :(

此外,在控制台开发人员中,我没有在任何地方看到一些称为语音识别或类似的 API :(

Anybody has a solution? Thanks

有人有解决方案吗?谢谢

回答by Skylion

Google shutdown the V1 API. Luckily, there is handy unofficial Java implementation for the new v2 version located here.

Google 关闭了 V1 API。幸运的是,有方便的非官方的Java实现对位于新版本V2这里

A key is required to get it working. You need to also subscribe to the chromium developers newsletter to be able to see the option for that key. Full instructions are included on the wiki of the project.

需要一把钥匙才能让它工作。您还需要订阅 Chromium 开发人员通讯才能看到该密钥的选项。完整的说明包含在项目的 wiki 中。