我在luis.ai和eu.luis.ai上都安装了一个应用程序。
我使用这个存储库中提供的SDK用于语音识别:https://github.com/Azure-Samples/Cognitive-Speech-STT-Android它有可能直接使用LUIS与语音识别相结合,这正是我所需要的。
它在luis.ai上工作,因为端点是west us。在eu.luis.ai上,它不能在SDK中工作,因为端点似乎是错误的。对于端点,appID和subID是错误的。
有没有办法强迫SDK (上面链接的存储库中的SDK)使用westeu或其他东西?
发布于 2017-05-18 15:45:59
假设您是指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)
更新而不是LUIS:
Android (https://github.com/Azure-Samples/Cognitive-Speech-STT-Android)有一个类似的方法来指定URL。请参见createDataClientWithIntent重载,该重载在https://github.com/Azure-Samples/Cognitive-Speech-STT-Android/blob/e27487b57f31afa04f6f3a8badfc566b1885011d/docs/com/microsoft/cognitiveservices/speechrecognition/SpeechRecognitionServiceFactory.html处接受可选的URL参数
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)
https://stackoverflow.com/questions/44048081
复制相似问题