私はC#を初めて使用し、Speech.Recognitionを初めて使用します。チュートリアルを非常に長い間検索しましたが、それほど多くは見つかりませんでした。すべてが正しく含まれているかどうかさえわかりません。
私がダウンロードしました:
私はローカルでプログラミングしています。WindowsXP、.netFramework3.5を使用しています。
ここで、「hello world」と言ったり、入力として1つまたは2つの単語を言ったりするなど、いくつかの簡単なコード行から始めたいと思います。
フォローしてみましたが、もちろん動作しません:>エラー:
「Typ-またはNamespacename「SpeechSynthesizer」が見つかりませんでした(Using-DirektiveまたはAssemblyverweisがありませんか?)」
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Speech.Recognition;
using System.Speech.Synthesis;
namespace System.Speech.Recognition { }
namespace System.Speech.AudioFormat {}
namespace System.Speech.Recognition.SrgsGrammar{}
namespace System.Speech.Synthesis { }
namespace System.Speech.Synthesis.TtsEngine { }
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
SpeechSynthesizer foo = new SpeechSynthesizer();
foo.Speak("Test");
}
}
}
編集:
こんにちは、私はあなたにコードを試しましたが、SpeechLibを使用しています。見つかりませんでした:>
さて今私は書いた:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Speech.Recognition;
using System.Speech.Synthesis;
using System.SpeechLib;
namespace System.SpeechLib { }
namespace System.Speech.Recognition { }
namespace System.Speech.AudioFormat {}
namespace System.Speech.Recognition.SrgsGrammar{}
namespace System.Speech.Synthesis { }
namespace System.Speech.Synthesis.TtsEngine { }
しかし、次のエラーが発生します。
nudeUpDown1、SpVoice、SpeechVoiceSpeakFlags、textBox1およびタイムアウト