MS机器人模拟器 - 保持麦克风开启?

时间:2017-09-11 08:35:59

标签: botframework

有没有人知道强制机器人模拟器麦克风始终保持开启(继续听?)的方法,以便我可以与机器人交谈(而不必继续按下右下角的麦克风图标?)

1 个答案:

答案 0 :(得分:0)

我不确定它在模拟器中的行为,但您可能想尝试将邮件的InputHint设置为ExpectingInput

the docs(这些来自Node.js版本,但也可能来自C#)。

期待输入

要表明您的机器人正在等待用户的响应,请将消息的输入提示设置为builder.InputHint.expectingInput。在许多频道上,这将导致客户端的输入框被启用并且麦克风被打开。以下代码示例创建一个提示,指示机器人期望用户输入。

builder.Prompts.text(session, 'This is the text that will be displayed.', {                                    
    speak: 'This is the text that will be spoken initially.',
    retrySpeak: 'This is the text that is spoken after waiting a while for user input.',  
    inputHint: builder.InputHint.expectingInput
});