How to get username & password for Watson Text to Speech Service?

隐身守侯 提交于 2020-01-13 14:03:35

问题


I wanted to play with the text to speech service and forked the Official Sample available at - Text to Speech Demo.

The sample uses Username and password while the credentials provide only an API Key.

The service(s) appear to be moving over to using API keys (in favour of username and password which is reasonable).

There must be a way to provide configuration(in the create new credentials page) which would provide the username and password. I can't locate those magic parameters to pass.

Any pointers would be appreciated.


回答1:


As you spotted, the services have moved over to using API keys through the IBM Cloud IAM.

The watson-developer-cloud sdks will still work but you need to provide an iam_apikey value instead of the username and password. Hopefully the samples will be updated in the very near future.

Also make sure to check the credentials object provided to you by IBM Cloud as some of the service urls have changed and need to be explicitly declared using url in your config object.




回答2:


Instead of userName use the word apikey as written here and in the password the api key of your service. so your credentials should be as follow :

userName: "apikey"
password: your service api key


来源:https://stackoverflow.com/questions/50519143/how-to-get-username-password-for-watson-text-to-speech-service

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!