简体   繁体   English

Microsoft Bot Framework示例致文本Bot的语音-clientid和clientSecret

[英]Microsoft Bot Framework Example Speech to Text Bot - clientid and clientSecret

UPDATE and GitHub Examples UPDATE和GitHub示例

To see the code of the sample on Speech to Text see the Microsoft Bot Builder GitHub . 要查看语音转换为文本的示例代码,请参阅Microsoft Bot Builder GitHub I have some personal examples on my GitHub as well starting with my LUISBankingBot . 我在GitHub上还有一些个人示例,也从LUISBankingBot开始。

Original Post 原始帖子

Trouble getting started with the Example Speech to Text Bot . 文本机器人示例演讲入门麻烦。 In the code snippet it asks for a clientid and clientSecret, but I am not sure where to find these. 在代码片段中,它要求提供一个clientid和clientSecret,但是我不确定在哪里可以找到它们。 In my Free Subscriptions (Bing Search - Free in particular) I have only a Key 1 and Key 2 , not sure where the clientid and clientSecret information could live. 在我的免费订阅 (尤其是必应搜索-免费版)中,我只有一个Key 1Key 2 ,不确定clientid和clientSecret信息可以存放在哪里。 I believe I can not move forward in the tutorial unless some help is given on where I can find the clientid and clientSecret information. 我相信除非在我可以找到clientid和clientSecret信息的地方提供了一些帮助,否则我将无法继续学习本教程。

Thanks for the help! 谢谢您的帮助! Happy botting! 祝您玩得开心!

在此处输入图片说明

Greg, glad you figured it out on your own. 格雷格,很高兴您自己弄清楚了。 My team wrote the example and the new sample code in Github. 我的团队在Github中编写了示例和新的示例代码。 I understand the confusion. 我理解混乱。 We'll make some edits to make the mapping of userid->clientid and apikey->clientsecret more clear. 我们将进行一些编辑,以使userid-> clientid和apikey-> clientsecret的映射更加清晰。 Thanks for posting! 感谢您的发布!

Suuuuper simple oversight here. Suuuuper在这里简单地进行监督。 The naming threw me off in the code sample, but check it! 命名使我不喜欢代码示例,但请检查一下!

tl;dr TL;博士

UserID = clientID
ApiKey = clientSecret

The class header for the Authentication class has params clientId and clientSecret ... but wait a minutes... Authentication类的类头具有参数clientIdclientSecret ...,但请等待几分钟...

public Authentication(string clientId, string clientSecret)

When making an instance of an Authentication, the current code snippet as of the writing of this post has the params for you to the fill in as 在创建Authentication实例时,截至撰写本文时,当前的代码片段具有以下参数供您填写:

YOURUSERID

and

<YOUR API KEY FROM MICROSOFT.COM/COGNITIVE

Authentication auth = new Authentication("YOURUSERID", "<YOUR API KEY FROM MICROSOFT.COM/COGNITIVE");

So another way of looking at this is : 因此,另一种查看方式是:

YOURUSERID = clientID
<YOUR API KEY FROM MICROSOFT.COM/COGNITIVE = clientSecret

That's it. 而已。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM