SAPI 安装后,怎么在VS2010(C#)中引用啊。

解决方案 »

  1.   

    http://www.codeproject.com/Articles/14044/SAPI-with-Microsoft-Agent-and-Visemes-to-Explain-T
      

  2.   

    2. 导入COM对象到.Net
    SAPI5.1的基于Windows平台的,通过COM接口进行调用。在.Net平台下要应用SAPI5.1,我们可以利用.Net Framework自带的强大工具TlbImp.exe来把SAPI SDK的COM对象导入到.Net中。TlbImp.exe产生一个管制的包装类,管理客户端可以使用它。包装类管理实际的COM对象的参考数。当包装类当作收集的垃圾时,包装类释放掉它包装的COM对象。当然,你也可以在VS.NET环境中通过从项目参考对话框选择COM对象,实现COM对象的导入,这个过程也是通过TlbImp.exe来完成的。
    下面演示如何导入SAPI的COM对象:
    D:\Program Files\Common Files\Microsoft Shared\Speech>Tlbimp sapi.dll /out: DotNetSpeech.dll在安转SDK以后,可以在D:\Program Files\Common Files\Microsoft Shared\Speech\目录下面找到SAPI.dll,这里面定义了SAPI的COM对象,用Tlbimp.exe工具将该dll转换成.net平台下的Assembly---DotNetSpeech.dll,转换的过程会提示不少的警告(warning),但这部影响我们的开发,可以忽略。最后,我们可以用ildasm查看DotnetSpeech.dll里面的对象。--------------------------------------------------------------------------------
      

  3.   

    http://www.microsoft.com/china/community/program/originalarticles/techdoc/Cnspeech.mspx
      

  4.   

    。net 4.0 自带的 不用那个 SDK
      

  5.   

    不知道怎么引用  
    好象要引用using DOtNET....(忘了)
      

  6.   

    添加引用的时候  找不到
    但已经安装了SAPI
      

  7.   

    http://msdn.microsoft.com/en-us/library/gg145021using System;
    using System.Speech.Synthesis;namespace SampleSynthesis
    {
      class Program
      {
        static void Main(string[] args)
        {      // Initialize a new instance of the SpeechSynthesizer.
          using (SpeechSynthesizer synthesizer = new SpeechSynthesizer())
          {        // Configure the audio output.
            synthesizer.SetOutputToDefaultAudioDevice();     
            synthesizer.Speak("hello world");
          }      Console.WriteLine();
          Console.WriteLine("Press any key to exit...");
          Console.ReadKey();
        }
      }
    }
      

  8.   

    为什么我这没有using System.Speech.Synthesis;
      

  9.   

    为什么在添加引用 .net里找不到  system.speech啊??