luis bot not speaking

旧街凉风 提交于 2019-12-02 14:44:53

问题


I'm using the LUIS bot in NodeJS and I am using session.say() to get the bot the speak but there is not audio output. I am trying to say a list of movies from a list like this session.say('hi', list.shift()) I know it works because 'hi' prints in the chat but no audio, I even put it in SSML format session.say('hi','<speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis" xml:lang="en-US">hey</speak>');

Any ideas why my bot isn't saying anything, but still printing stuff in the chat?


回答1:


To use the text to speech feature on the Bot Framework Emulator, the user has to use the microphone on the emulator first. Basically, the bot will only speak to the user if the user speaks to the bot first. Note, there are several steps you need to follow to enable the microphone feature on the emulator:

  1. If you do not already have a microsoftAppId and microsoftAppPassword for your bot, you will either have to create a new bot or register your bot on the Azure Portal. Be aware that if you choose to register your bot, you will not be able to deploy it later without creating a new bot.
  2. Once you have your microsoftAppId and microsoftAppPassword, you will have to create a .env file to store them. It should look like:

    MicrosoftAppId=YOUR_MICROSOFT_APP_ID MicrosoftAppPassword=YOURR_MICROSOFT_APP_PASSWORD

    Also, make sure you have configured thedotenv in your app.js file.

  3. Now, you have to either add your microsoftAppId and microsoftAppPassword to the developer endpoint in your bot file or add it through the emulator. To add it in the emulator, right click on your bot under the ENDPOINT section and select Edit Settings. It should open a prompt where you can fill in the microsoftAppId and microsoftAppPassword.

Once you have completed all of the steps above, run your bot and connect to it in the emulator. You should be able to use the microphone to talk to your bot, and the bot should respond by speaking some text. Hope this helps.



来源:https://stackoverflow.com/questions/53600369/luis-bot-not-speaking

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