【问题标题】:How to change endpoint for Android Speech Language Understanding (LUIS) SDK?如何更改 Android 语音语言理解 (LUIS) SDK 的端点?
【发布时间】:2020-03-02 01:33:19
【问题描述】:

我在 luis.ai 和 eu.luis.ai 上都设置了一个应用程序。

我使用此存储库中提供的 SDK 将其用于语音识别目的:https://github.com/Azure-Samples/Cognitive-Speech-STT-Android 它可以直接使用 LUIS 和语音识别相结合,这正是我所需要的。

它适用于 luis.ai,因为端点在我们西部。在 eu.luis.ai 上,它在 SDK 中不起作用,因为端点似乎是错误的。端点的 appID 和 subID 错误。

有没有办法强制 SDK(上面链接的存储库中的那个)使用 westeu 或其他东西?

【问题讨论】:

    标签: android speech-recognition speech-to-text microsoft-cognitive


    【解决方案1】:

    假设您指的是https://github.com/Microsoft/Cognitive-LUIS-Windows,LuisClient 构造函数有一个接受基本 URI 的重载。具体见https://github.com/Microsoft/Cognitive-LUIS-Windows/blob/master/ClientLibrary/LuisClient.cs

        /// <summary>
        /// Construct a new Luis client with a shared <see cref="HttpClient"/> instance.
        /// </summary>
        /// <param name="appId">The application ID of the LUIS application</param>
        /// <param name="appKey">The application subscription key of the LUIS application</param>
        /// <param name="baseApiUrl">Root URI for the service endpoint.</param>
        /// <param name="preview">A flag indicating whether to use preview features or not (Dialogue)</param>
        /// top scoring in case of using the dialogue</param>
    
        public LuisClient(string appId, string appKey, string baseApiUrl, bool preview = false)
    

    Android Speech SDK 而非 LUIS SDK 的更新:

    Android Speech SDK (https://github.com/Azure-Samples/Cognitive-Speech-STT-Android) 有类似的方法来指定 URL。请参阅在 https://github.com/Azure-Samples/Cognitive-Speech-STT-Android/blob/e27487b57f31afa04f6f3a8badfc566b1885011d/docs/com/microsoft/cognitiveservices/speechrecognition/SpeechRecognitionServiceFactory.html 处采用可选 URL 参数的 createDataClientWithIntent 重载:

    createDataClientWithIntent(android.app.Activity activity, java.lang.String language, ISpeechRecognitionServerEvents eventHandlers, java.lang.String primaryKey, java.lang.String secondaryKey, java.lang.String luisAppId, java.lang.String luisSubscriptionId, java.lang.String url)

    【讨论】:

    • 对不起,这是安卓系统。我想我只是在标题中提到它,会更新以使其更清晰。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-02-26
    • 1970-01-01
    • 2017-02-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多