この質問は4〜5回ほどで議論されていますが、投稿されたソリューションはどれも私を助けませんでした。Google音声APIにアクセスしているうちに、サーバーから禁止されている403を受け取っています
私はGoogleの開発者アカウントを作成し、Googleの音声APIを有効にし、登録したプロジェクトとAPI_KEYを生成しました。私はJARVIS(Google speech v2)を使って、Javaプログラムの音声を合成して認識しています。
URLを照会するとき、サーバーは常に403(禁止)で応答します。私はそれが私が許可されていないと言っていることを理解しています。私はそれを整理するための請求を有効にしましたが、運はありません。
Server returned HTTP response code: 403 for URL: https://www.google.com/speech-api/v2/recognize?output=json&lang=en-us&key=MY_KEY?client=chromium&output=json&lang=en-US&maxresults=4
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
at com.darkprograms.speech.recognizer.Recognizer.rawRequest(Recognizer.java:455)
at com.darkprograms.speech.recognizer.Recognizer.getRecognizedDataForFlac(Recognizer.java:280)
at com.darkprograms.speech.main.ArtificialIntelligenceErrorDetection.speechToTextLogic(ArtificialIntelligenceErrorDetection.java:80)
at com.darkprograms.speech.main.ArtificialIntelligenceErrorDetection.listenAlexa(ArtificialIntelligenceErrorDetection.java:43)
at com.darkprograms.speech.main.VoiceServer$voiceHandler.handle(VoiceServer.java:60)
私はGoogleによって生成されたプロジェクトIDを使用していません。私はここにいくつかの行方不明のリンクがあると思う。しかし、この点であなたの賢明な思考を要求する。
ありがとうございます。
APIを使用して、クレデンシャルを渡す必要があるとしますか? –