我正在NodeJS中使用LUIS机器人,并且正在使用session.say()使机器人说话,但是没有音频输出.我想说一个像这样的列表中的电影列表session.say('hi', list.shift())我知道它可以工作,因为"hi"在聊天中打印,但没有音频,我什至将其设置为SSML格式 session.say('hi','<speak version="1.0" xmlns="www.w3/2001/10/synthesis" xml:lang="en-US">hey</speak>');
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="www.w3/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?
推荐答案要在Bot Framework仿真器上使用文本语音转换功能,用户必须首先在仿真器上使用麦克风.基本上,只有在用户首先与机器人对话时,机器人才会与用户对话.请注意,要在模拟器上启用麦克风功能,您需要执行以下几个步骤:
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:
一旦有了microsoftAppId和microsoftAppPassword,就必须创建一个.env文件来存储它们.看起来应该像这样:
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
MicrosoftAppId=YOUR_MICROSOFT_APP_ID MicrosoftAppPassword=YOURR_MICROSOFT_APP_PASSWORD
此外,请确保已在app.js文件中配置了dotenv.
Also, make sure you have configured thedotenv in your app.js file.
完成上述所有步骤后,运行您的机器人并在模拟器中连接到它.您应该能够使用麦克风与您的机器人对话,并且机器人应该通过说出一些文字来做出回应.希望这会有所帮助.
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.
更多推荐
Luis Bot不说话
发布评论