2017-07-18 60 views
0

我想知道如何最好地應對Cortana有時候做出的解釋錯誤。處理Cortana解釋錯誤

例如;我正在構建一個bot,它使用預先構建的家庭自動化實體爲我處理一些家庭自動化意圖。現在我添加了一個名爲HomeAutomation.Activate的意圖。這是爲了激活我的家庭自動化軟件中設置的某個場景。

現在這可能是我的非本地口音,但Cortana有時不會解釋我說的確切單詞。這主要發生在「場景」這個詞上,她有時會把它翻譯爲「看」,「高級」或「說」,這聽起來很像。

所以現在我的問題是:

  1. 我應該考慮到這一點還是要靠提高柯塔娜她聽嗎?
  2. 如果不是,我可以確保LUIS得到正確的解釋;但最好的方法是什麼?學習這些其他詞作爲意圖培訓的一部分?或者以某種方式學習它來理解某個單詞的聲音 - 喜歡嗎?

任何指導將不勝感激!

+0

我有同樣的問題與Alexa一會兒回來後,我把Alexa想說的話加入了話語中,以便將它們映射到解決問題的正確意圖。可能不是最優雅的解決方案,但它的工作。 – JasonSowers

回答

2

您可以嘗試語音識別啓動,這是創建LUIS應用程序的過程,可識別您希望Cortana技能識別的單詞,並將其鏈接到Cortana技能。在LUIS應用程序中,您可以添加一些您想要識別爲實體的代表性話語和標籤詞語。

這裏有描述它的一篇文章:https://blog.botframework.com/2017/06/26/Speech-To-Text/#intent-based-speech-priming-for-natural-language

+0

如果您要提供鏈接作爲答案,請提供一些上下文:https://stackoverflow.com/help/how-to-answer –

0

如果您正在使用C#和對話框,你可以嘗試用PromptOptionsWithSynonyms的參數發揮:https://docs.microsoft.com/en-us/dotnet/api/microsoft.bot.builder.dialogs.promptoptionswithsynonyms-1.-ctor?view=botbuilder-3.8。如果這只是一小部分被誤解的單詞,這有點破解,但你可以嘗試將錯誤添加爲「場景」的同義詞。嘗試另一種選擇是降低PromptDialog.Choice函數調用MinScore是參數(我找不到這個文檔中),但功能被定義爲這樣的:

// Summary: 
    //  Prompt for one of a set of choices. 
    // 
    // Parameters: 
    // context: 
    //  The dialog context. 
    // 
    // resume: 
    //  Resume handler. 
    // 
    // promptOptions: 
    //  The prompt options. 
    // 
    // recognizeChoices: 
    //  (Optional) if true, the prompt will attempt to recognize numbers in the users 
    //  utterance as the index of the choice to return. The default value is "true". 
    // 
    // recognizeNumbers: 
    //  (Optional) if true, the prompt will attempt to recognize ordinals like "the first 
    //  one" or "the second one" as the index of the choice to return. The default value 
    //  is "true". 
    // 
    // recognizeOrdinals: 
    //  (Optional) if true, the prompt will attempt to recognize the selected value using 
    //  the choices themselves. The default value is "true". 
    // 
    // minScore: 
    //  (Optional) minimum score from 0.0 - 1.0 needed for a recognized choice to be 
    //  considered a match. The default value is "0.4". 
    // 
    // Type parameters: 
    // T: 
    //  The type of the options. 
    // 
    // Remarks: 
    //  T should implement System.Object.ToString 
    public static void Choice<T>(IDialogContext context, ResumeAfter<T> resume, IPromptOptions<T> promptOptions, bool recognizeChoices = true, bool recognizeNumbers = true, bool recognizeOrdinals = true, double minScore = 0.4);