【发布时间】:2019-05-09 06:53:24
【问题描述】:
我正在尝试使用 Watson Speech To Text 服务,该服务需要按照 documentation 的 websocket 接口使用以下命令
var token = {authentication-token};
var wsURI = 'wss://stream.watsonplatform.net/speech-to-text/api/v1/recognize'
+ '?watson-token=' + token
+ '&model=es-ES_BroadbandModel';
我已经尝试在终端上使用 curl 命令获取{authentication-token}
curl -X GET --user "apikey:{apikey}" "https://stream.watsonplatform.net/authorization/api/v1/token?url=https://stream.watsonplatform.net/text-to-speech/api"
上面的命令产生
错误:{"code":401,"error":"Unauthorized","description":"ERCD250-LDAP-DN-AUTHERR"}
找不到合适的文档,包括在 IBM watson 团队发布 recent changes 之后似乎超出范围的几篇帖子。
问题:如何获得authentication-token 以正确连接到 watson Web 套接字?
【问题讨论】: