简体   繁体   English

无法授权Watson Assistant音频客户端

[英]Cannot authorize Watson assistant audio client

I am developing a simple audio client for Watson assistant solutions and I am having problems authorizing the client. 我正在为Watson Assistant解决方案开发一个简单的音频客户端,但是在授权客户端时遇到问题。

I am following this guide https://watson-personal-assistant.github.io/developer/audio/audio_authentication/ but the Api Key I am using is not recognized. 我正在遵循此指南https://watson-personal-assistant.github.io/developer/audio/audio_authentication/,但无法识别我正在使用的Api密钥。 The error message I get is the following: 我收到的错误消息如下:

"errorMessage": "Provided API key could not be found"

The Api Key I am using is the one displayed in the user's card (that appears when clicking the user's avatar in the top-right corner of the page). 我正在使用的Api密钥是用户卡中显示的密钥(单击页面右上角的用户头像时显示)。

In the console there is the Clients tab which states: 在控制台中,有“客户端”选项卡,其中指出:

A client can be a device such as a smart speaker or wearable, but it could also be a mobile app or web-based chatbot. 客户端可以是诸如智能扬声器或可穿戴设备之类的设备,但也可以是移动应用程序或基于Web的聊天机器人。 Use this page to create credentials for those clients and assign an entity to them. 使用此页面可以为这些客户端创建凭据并为其分配实体。

I thought that an Api Key could be created here, but it is not. 我以为可以在此处创建Api密钥,但事实并非如此。

The Watson Assistant Solutions Service is now using IAM API key instead of the API key for the MultiTenant Audio Gateway. Watson Assistant解决方案服务现在正在使用IAM API密钥而不是MultiTenant音频网关的API密钥。 This does pre-req that you have a An IBM Cloud ID account 这确实需要您拥有一个IBM Cloud ID帐户

  1. To create your own IBM IAM API key use these directions https://console.bluemix.net/docs/iam/userid_keys.html#userapikey 要创建自己的IBM IAM API密钥,请使用以下指示信息https://console.bluemix.net/docs/iam/userid_keys.html#userapikey
  2. You also need your tenant id you can find that in the WASol Console. 您还需要您的租户ID,您可以在WASol控制台中找到它。

在此处输入图片说明

  1. Your client will have to send the following properties 您的客户将必须发送以下属性

    Server connection parameterss. 服务器连接参数。 For userID note to not include ( @ # . or other special chars). 对于userID,请注意不包含(@#。或其他特殊字符)。 There is an issue we are fixing. 我们正在解决一个问题。

     host=wa-audio-gateway.mybluemix.net userID=carlos.ferreira 

    IAM API Key is Used to authenticate the client device IAM API密钥用于验证客户端设备

     IAMAPIKey=yourIAMAPIkey 

    Choosing which skill set to use (Required parameter) 选择要使用的技能集(必填参数)

     skillset=industry 

    Your tenant ID (Required parameter) 您的租户ID(必填参数)

     tenantID=yourtenantID 

    Client language specific preferences can be passed (Optional parameter with a default value: en-US) 可以传递特定于客户端语言的首选项(具有默认值的可选参数:en-US)

     language=en-US 

    Choosing which STT and TTS engine to convert audio to text and text to audio - possible values are : watson, google , (Optional parameter with a default value : watson) 选择哪个STT和TTS引擎将音频转换为文本并将文本转换为音频-可能的值为:watson,google(默认值为watson的可选参数)

     engine=google 

    Controls playback method. 控制播放方法。 Playback using an audio URL in the response [true], playback by streaming audio from the server [false] 在响应中使用音频URL进行播放[true],通过流传输来自服务器的音频进行播放[false]

     urltts=false 
    1. You can find a reference Java implementation for the Audio Gateway here. 您可以在此处找到音频网关的参考Java实现。 https://github.com/Watson-Personal-Assistant/AudioClientSampleCodeJava https://github.com/Watson-Personal-Assistant/AudioClientSampleCodeJava

Please note that you also need to use IBM APIKey for programmatic access to the WASol Core text routing service. 请注意,您还需要使用IBM APIKey来以编程方式访问WASol Core文本路由服务。 Here is a code example I did to get Amazon Dot/Alexa skill to communicate with WASol Assistant skill set. 这是我获得Amazon Dot / Alexa技能以与WASol Assistant技能集通信的代码示例

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

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