Luis Bot不说话

编程入门 行业动态 更新时间:2024-10-11 07:31:36
本文介绍了Luis Bot不说话的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在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,则必须创建一个新的漫游器或在Azure门户上注册您的漫游器.请注意,如果您选择注册您的漫游器,则以后如果不创建新的漫游器,将无法对其进行部署.
  • 一旦有了microsoftAppId和microsoftAppPassword,就必须创建一个.env文件来存储它们.看起来应该像这样:

  • 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.
  • 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不说话

    本文发布于:2023-11-27 21:46:59,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1639712.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:不说话   Luis   Bot

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!