【问题标题】:Client ID for Project Oxford Speech APIProject Oxford Speech API 的客户端 ID
【发布时间】:2016-08-03 09:29:48
【问题描述】:

我想测试 Microsoft Project Oxford 语音识别 API,但我不知道在哪里或如何获取 client_id。

我正在尝试测试搜索 API。首先,我正在尝试获取使用该服务的令牌:

curl -d -i "https://oxford-speech.cloudapp.net/token/issueToken?grant_type=client_credentials&client_id=123&client_secret=456scope=https%3A%2F%2Fspeech.platform.bing.com"
{ "statusCode": 401, "message": "Access denied due to invalid subscription key. Make sure you are subscribed to an API you are trying to call and provide the right key." }

我有主键和辅助键,但找不到 client_id。有人可以帮忙吗?

【问题讨论】:

  • 不是和azure的userId一样吗?
  • 我尝试使用我的电子邮件地址作为 Client_id 用于登录 Azure - 不起作用...

标签: azure curl speech-recognition microsoft-cognitive


【解决方案1】:

看这里

// 注意:在http://www.projectoxford.ai 注册以获取订阅密钥。从 Azure 市场搜索语音 API。
// 使用订阅密钥作为下面的客户端密码。 Authentication auth = new Authentication("想出一个简短的ClientId", "Client Secret");

更多说明在这里http://www.projectoxford.ai/doc/general/subscription-key-mgmt

【讨论】:

  • >> 想出一个简短的 ClientId 所以我尝试了这个: curl -d -i "oxford-speech.cloudapp.net/token/… secret key>&scope=https%3A%2F%2Fspeech.platform.bing.com" 和还有 (client_id=tomas0413) 在这两种情况下我都会得到: { "statusCode": 401, "message": "Access denied due to invalid subscription key. 确保您订阅了您尝试调用的 API 并提供右键。” }
  • 一旦你有了这些信息,这个命令应该可以工作了: curl -v -X POST "api.projectoxford.ai/speech/v0/internalIssueToken" -H "Content-Type: application/x-www-form-urlencoded" -H " Ocp-Apim-Subscription-Key: --data-ascii "grant_type=client_credentials&client_id=&client_secret=&scope=speech.platform.bing.com"
【解决方案2】:
  1. 转到以下链接Subscribe to speech control 并订阅语音识别控制...
  2. 使用此link 注册一个新应用程序,您可以在此处提供您选择的客户 ID,稍后将在应用程序中使用..
  3. 最后转到以下链接 [www.microsoft.com/cognitive-services/en-us/subscriptions] 使用 Microsoft 帐户登录并找到您想要使用的任何 api 的订阅密钥并将此密钥用作 CLIENT SECRET
  4. 希望这会有所帮助,因为我已经对此进行了测试,并且非常适合我...
  5. 第三个链接在括号中,因为我不允许超过 2 个链接...

【讨论】:

    【解决方案3】:

    注册 Speech API 后,您可以使用此链接查看您的订阅密钥:https://www.microsoft.com/cognitive-services/en-us/subscriptions

    Authentication auth = new Authentication("Come up with a short ClientId", "Client Secret");
    

    在您的代码中,请勿提供简短的 ClientId。只需将“Come up with a short ClientId”替换为您在订阅页面上找到的第一个密钥,并将“Client Secret”替换为您在订阅页面上找到的第二个密钥。

    【讨论】:

      猜你喜欢
      • 2016-07-31
      • 1970-01-01
      • 1970-01-01
      • 2017-03-24
      • 1970-01-01
      • 2016-06-27
      • 2016-07-22
      • 2011-12-01
      • 2023-03-17
      相关资源
      最近更新 更多