在C#windowform中调用amlboot的load.bootsetting函数时出现错误

时间:2019-05-20 08:46:19

标签: c# winforms artificial-intelligence speech-recognition

在此处输入图片说明1-当我尝试获取bot.loadsetting(path)时。其给出的expestion值不能为空,参数名称为name.path2。 2-i尝试了很多解决方案,但问题是相同的。

3-当我尝试获取bot.loadsetting(path)时。其给出的expestion值不能为空,参数名称为name.path2。 4-i尝试更改文件路径,但对我不起作用 并尝试了其他方法来获取路径,但是它也有相同的错误。

   private SpeechRecognitionEngine engine;
   private SpeechSynthesizer Synthesizer;
    private Bot bot;

    private User user;
    SpeechRecognitionEngine speechreco = new SpeechRecognitionEngine(); 
    SpeechSynthesizer jarvis = new SpeechSynthesizer();
    engine = new SpeechRecognitionEngine();
     engine.SetInputToDefaultAudioDevice();
     engine.LoadGrammar(new DictationGrammar());
     engine.SpeechRecognized += new 
     EventHandler<SpeechRecognizedEventArgs>(rec);
     engine.RecognizeAsync(RecognizeMode.Multiple);

    string settingsPath = Path.Combine(Environment.CurrentDirectory, 
     Path.Combine("config", "Settings.xml"));
     bot.loadSettings(settingsPath);

[

] 1 代码运行并且没有给出该错误,我需要解决方案

0 个答案:

没有答案