在我的BOT中,我想记录向机器人提供语音输入的时间。有没有办法在我的BOT框架解决方案中识别它。
发布于 2021-01-28 23:29:26
当用户在网络聊天中与机器人交谈时,发送给bot的生成的活动将包括一个channelData.speech属性。在机器人中,您可以使用它作为一个标记来确定该活动是否来自口头或文本输入。当从文本输入生成活动时,不会追加speech属性。这既适用于认知服务语音(channelId:'directline'),也适用于直行语音(channelId:'directlinespeech')。
示例活动
{
type: 'message',
id: '26WpGqt6CCz7M8uRN0ugo9-o|0000002',
timestamp: 2021-01-28T23:12:10.281Z,
serviceUrl: 'https://directline.botframework.com/',
channelId: 'directline',
from: { id: '<<REDACTED>>', name: '', role: 'user' },
conversation: { id: '26WpGqt6CCz7M8uRN0ugo9-o' },
recipient: { id: '<<REDACTED>>', name: '<<REDACTED>>' },
textFormat: 'plain',
locale: 'en-US',
text: 'Hello.',
entities: [ [Object] ],
channelData: {
speech: {
alternatives: [
{
confidence: 0.51567326,
transcript: 'Hello.'
}
]
},
clientActivityID: '1611875530186v9cv78togd',
clientTimestamp: '2021-01-28T23:12:10.186Z'
},
rawTimestamp: '2021-01-28T23:12:10.2819155Z',
callerId: 'urn:botframework:azure'
}希望得到帮助!
https://stackoverflow.com/questions/65874874
复制相似问题