unity3d - IBM Watson Text to Speech credentials.HasIamTokenData() 每次都返回 null
问题描述
credentials = new Credentials(tokenOptions, _serviceUrl);
// Wait for tokendata
while (!credentials.HasIamTokenData())
{
yield return null;
}
credentials.HasIamTokenData()
每次都返回null
,当我在 中使用我的应用程序时Hololens
,但它在Unity3D editor
.
我不确定我是否错过了什么,我需要为 Hololens 做特别的事情。
我传递了空_serviceUrl
,因为它在显式指定注释时考虑默认值。会不会跟那个有关系?
解决方案
应声明服务端点 url。您可以通过服务实例的位置找到对应的 url:
https://cloud.ibm.com/apidocs/text-to-speech/text-to-speech?code=unity#service-endpoint
推荐阅读
- wordpress - 是否可以将分类术语用作类别?
- amazon-cloudformation - 如何在 AWS 无服务器函数中设置 Oauth 范围?
- python - AWS Sagemaker 多项训练作业
- filepond - 在 ondata 事件中获取文件路径
- python - Visual Studio Code Python 中的 Pylint 错误
- linux - 如何根据 linux 中的条件(使用 awk 或任何其他)从另一个 csv 文件替换一个 csv 文件的行?
- php - 将数据从三个表单发送到控制器
- encryption - 从未加密的 Redshift 集群迁移到加密的集群
- ruby - 无法使用 DynamoDB GSI
- vb.net - Vb.net 使用 OdbcConnection 登录