首页 > 解决方案 > 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,因为它在显式指定注释时考虑默认值。会不会跟那个有关系?

标签: unity3dibm-watson

解决方案


应声明服务端点 url。您可以通过服务实例的位置找到对应的 url:

https://cloud.ibm.com/apidocs/text-to-speech/text-to-speech?code=unity#service-endpoint


推荐阅读