简体   繁体   English

如何获取Watson Speech to Text的IAM apikey和IAM url?

[英]How to get IAM apikey and IAM url for Watson Speech to Text?

I want to play with the IBM Watson Speech to Text Service. 我想玩IBM Watson语音转文本服务。 How do I get the IAM apikey and the IAM url. 如何获取IAM apikey和IAM url。

On show credentials, I get this - { "apikey": "###########", "iam_apikey_description": "Auto generated apikey during resource-key operation for Instance - #######", "iam_apikey_name": "######", "iam_role_crn": "######", "iam_serviceid_crn": "######", "url": " https://gateway-syd.watsonplatform.net/speech-to-text/api " } 在显示凭证上,我得到以下信息-{“ apikey”:“ ###########”,“ iam_apikey_description”:“在实例的资源键操作期间自动生成的apikey-####### ”,“ iam_apikey_name”:“ ######”,“ iam_role_crn”:“ ######”,“ iam_serviceid_crn”:“ ######”,“ URL”:“ https:// gateway-syd.watsonplatform.net/语音到文本/ api “}

If you are using the API docs to code in a programming language like Node.JS - Your apikey in the credentials is the IAM_apikey and url is the URL in your credentials. 如果您使用的是API文档的编程语言如Node.js的编写-您apikey的凭据是IAM_apikey和url是在您的凭据的URL。

If you are planning to use curl, you can generate an access token using the apikey and url following the instructions here 如果您打算使用curl,可以按照此处的说明使用apikey和url生成访问令牌。

You can also use the same "basic" authorization to try out any Watson service in Curl: 您还可以使用相同的“基本”授权来试用Curl中的任何Watson服务:

curl -u "apikey:{apikey}" "{url}/{method}"

replace {apikey} with the ### value you see and replace {url} with that value. 将{apikey}替换为您看到的###值,并将{url}替换为该值。

For example, 例如,

curl -X GET -u "apikey:"###########" "https://stream.watsonplatform.net/speech-to-text/api/v1/models"

See https://cloud.ibm.com/apidocs/speech-to-text#authentication 请参阅https://cloud.ibm.com/apidocs/speech-to-text#authentication

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM