【发布时间】:2017-07-21 09:21:03
【问题描述】:
我正在尝试使用 IBM Bluemix German STT 服务器。在 Bluemix 环境中,(英文)文档具有与我的身份验证凭证旁边显示的(德文)链接不同的链接。不出所料,文档描述的方法告诉我我没有访问权限。在德语 URL 上使用该方法告诉我我没有使用正确的请求方法。那么,有人知道如何让德国服务器返回我对音频文件的转录吗?
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"
【问题讨论】:
-
您查看过ibm.com/watson/developercloud/speech-to-text/api/v1/… 的语法和选项吗?您需要使显示的 URI 适应法兰克福服务器。
-
排除显而易见的问题。您是否提供了服务用户名和密码?此外,服务凭据应该为您提供端点 URL。
标签: curl ibm-cloud speech-to-text