【发布时间】:2020-05-14 18:52:54
【问题描述】:
所以,我做了一个语音识别器,它工作正常,我不确定它为什么现在给我这个错误。有什么想法吗?
String res = e.Result.Text;
string yol = System.IO.Path.GetDirectoryName(Application.ExecutablePath);
string settings = ("@" + yol + "\\" + "settings" + "\\");
if (res == "Hi Bot")
{
pictureBox1.Image = Image.FromFile(settings + "mybot.png"); -->That's where i get the error
say(greetings_random());
}
【问题讨论】:
-
检查 mybot.png 的“复制到输出目录”设置。 (右键mybot.png,选择属性,看看Copy to Output Directory是否没有“Do not copy”的值
标签: c# speech-recognition