使用Bot Framework代表用户发送消息

我目前正在尝试接受来自用户的语音input,将其馈送到Bing Speech API以获取文本,并将该文本作为用户响应传递。 我已经收到从Bing收到的文本,但我不知道如何发送该文本作为用户响应。 我一直在淘GitHub,所以任何反馈意见。 相关代码如下:

function(session){ var bing = new client.BingSpeechClient('mykey'); var results = ''; var wave = fs.readFileSync('./new.wav'); const text = bing.recognize(wave).then(result => { console.log('Speech To Text completed'); console.log(result.header.lexical) console.log('\n'); results.response = result.header.lexical; }); }] 

你应该使用session.send

我build议你看一下情报 – SpeechToText示例,其中显示了类似的情况。

更新:找出(sorta)。 为了利用发送这个用户input,我不得不使用另一张卡。 在卡的上下文中,我可以使用imBackfunction