2017-07-21 10 views
0

IBM Bluemix German STTサーバーを使用しようとしています。 Bluemix環境では、(英語)ドキュメントには、自分の認証資格情報の横に表示される(ドイツ語)リンクとは別のリンクがあります。驚くことではないが、ドキュメントに記載されている方法では、私にアクセス権がないと伝えられている。このメソッドをドイツ語のURLで使用すると、正しいリクエストメソッドを使用していないことがわかります。ですから、どのようにしてドイツのサーバーにオーディオファイルの写しを返すことができるのでしょうか?ドイツ語サーバーへのWatson Speech to Textの要求

PS。このリンクは正しい方向ですが、SSTの質問の説明はTTSサービスのためのものです: How can I access IBM speech-to-text api with curl? PS2。データは国

米国/グローバルサーバ

curl -X POST -u {username}:{password} --header "Content-Type: audio/flac" --header "Transfer-Encoding: chunked" --data-binary ./audio-file.flac "https://stream.watsonplatform.net/speech-to-text/api/v1/recognize" 

戻り

{ "code" : 401 , "error" : "Not Authorized" , "description" : "2017-07-21T05:15:17-04:00, Error ERCDPLTFRM-DNLKUPERR occurred when accessing https://stream.watsonplatform.net/speech-to-text/api/v1/recognize, Tran-Id: stream-dp02-872773132 - Invalid UserId and/or Password. Please confirm that your credentials match the end-point you are trying to access. A common error is trying to use credentials from an experimental or beta release against a GA release or vice versa" } 

ドイツのサーバーを残すべきではないと私はドイツ語のサーバーを必要とする

curl -X POST -u {username}:{password}--header "Content-Type: audio/flac" --header "Transfer-Encoding: chunked" --data-binary ./audio-file.flac "https://stream-fra.watsonplatform.net/speech-to-text/api" 

応答

{ 
    "error": "Your browser approached me (at /speech-to-text/api) with the method \"POST\". I only allow the methods HEAD, GET here.", 
    "code": 405, 
    "code_description": "Method Not Allowed" 
+0

構文とオプションについては、https://www.ibm.com/watson/developercloud/speech-to-text/api/v1/#recognize_sessions_nonmp18を参照してください。表示されたURIをフランクフルト・サーバーに適合させる必要があります。 –

+0

明白なことを否定する。サービスのユーザー名とパスワードを提供していますか?また、サービスクレデンシャルからエンドポイントURLを取得する必要があります。 –

答えて

0

私に正しい提案を提供してくれてありがとう、data_henrik。私はそれを受け入れることができるように、あなたのコメントを答えとして書くように自由に感じてください。

回答:V1 /リンクの最後に認識します。
代わりの

curl -X POST -u {username}:{password}--header "Content-Type: audio/flac" --header "Transfer-Encoding: chunked" --data-binary ./audio-file.flac "https://stream-fra.watsonplatform.net/speech-to-text/api" 

私は

curl -X POST -u {username}:{password} --header "Content-Type: audio/flac" --data-binary "@audio-file.flac" "https://stream-fra.watsonplatform.net/speech-to-text/api/v1/recognize" 

違いを使用している必要があります。

関連する問題