【问题标题】:Providing Speech Channel Secret in the Microsoft botframework Android Virtual Assistant Client在 Microsoft botframework Android Virtual Assistant Client 中提供语音通道密钥
【发布时间】:2019-07-01 17:55:35
【问题描述】:

我正在尝试从https://github.com/microsoft/botframework-solutions/blob/master/solutions/android/VirtualAssistantClient 运行 Microsoft botframework 的 android Virtual Assistant Client。

当我运行它时,它总是不停地说“重新连接到服务器”而没有做任何其他事情。有一个麦克风按钮,按下时说我正在听,但什么也没做。

在自述文件中,他们建议将语音通道密码添加到 DefaultConfiguration.java。 DefaultConfiguration.java 文件中没有定义这样的变量。

我认为我们需要在某处提供此直连语音通道密码才能使此示例客户端正常运行,但找不到添加该密码的位置。

注意,我的 Bot 正在模拟器上运行,也可以在使用直线语音的网络聊天中运行。谢谢

【问题讨论】:

标签: java android botframework


【解决方案1】:

我对此进行了一些研究,您似乎在该解决方案中发现了一个错误。 You can see in the code,其中 BotConnectorConfig 是从密钥创建的,但使用的是 configuration.botId

BotConnectorConfig botConfig = BotConnectorConfig.fromSecretKey(
        configuration.botId,
        configuration.serviceKey,
        configuration.serviceRegion);

BotConnectorConfig.fromSecretKey 的文档确认它应该使用语音通道密钥而不是机器人 ID。这与其他客户端应用程序的工作方式是一致的。在网络聊天中,您只需要一个 Direct Line 密码,这样您就可以连接到特定的机器人,而无需提供机器人 ID。

现在,只需在 DefaultConfiguration.java 中提供您的语音通道密码作为 BOT_ID 字段。

【讨论】:

    猜你喜欢
    • 2022-07-23
    • 1970-01-01
    • 2019-11-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-05-29
    相关资源
    最近更新 更多