简体   繁体   中英

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.

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. 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).

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. 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.

The Watson Assistant Solutions Service is now using IAM API key instead of the API key for the MultiTenant Audio Gateway. This does pre-req that you have a An IBM Cloud ID account

  1. To create your own IBM IAM API key use these directions 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.

在此处输入图片说明

  1. Your client will have to send the following properties

    Server connection parameterss. For userID note to not include ( @ # . or other special chars). 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

     IAMAPIKey=yourIAMAPIkey 

    Choosing which skill set to use (Required parameter)

     skillset=industry 

    Your tenant ID (Required parameter)

     tenantID=yourtenantID 

    Client language specific preferences can be passed (Optional parameter with a default value: 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)

     engine=google 

    Controls playback method. Playback using an audio URL in the response [true], playback by streaming audio from the server [false]

     urltts=false 
    1. You can find a reference Java implementation for the Audio Gateway here. 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. Here is a code example I did to get Amazon Dot/Alexa skill to communicate with WASol Assistant skill set.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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