To ILoveProgram(编程爱好者): 
哪儿有MS Speech SDK的例子,MSDN中没有啊!谢谢!

解决方案 »

  1.   

    ~~~~~~~~~~~~~Microsoft Agent 
      

  2.   

    去加入微软的agent新闻组,里面既有例子,又有相关网站
      

  3.   

    #include <SAPI.h>
    CString strText="你好";
    ISpVoice * pVoice = NULL;
    if (FAILED(CoInitialize(NULL)))
    {
         AfxMessageBox("Error to intiliaze COM");
         return;
    }HRESULT hr = CoCreateInstance(CLSID_SpVoice, NULL, CLSCTX_ALL, IID_ISpVoice, (void **)&pVoice);
    if( SUCCEEDED( hr ) )
    {
        hr = pVoice->Speak(strText.AllocSysString(), 0, NULL);
        pVoice->Release();
        pVoice = NULL;
    }
    CoUninitialize();
      

  4.   

    要安装 speech sdk ,还有中文语音包
      

  5.   

    To gboy(hello): speech sdk和中文语音包在哪儿有呢?谢谢!
      

  6.   

    microsoft 的网站上可以下在,不过好像要 100 多M
      

  7.   

    To gboy(hello): 你手头有没有这个sdk?我是教育网用户,不能访问微软站点。能不能留下QQ交流一下,我的QQ是:1074487
      

  8.   

    To gboy(hello):
    你手头有相关的资料吗?
      

  9.   

    ............."$$$$$$$o...................ooooo 
    .............."$$$$$$$$$o.........ooo$$$$$$$$$ 
    .......ooo$$$$$$$$$$$$$$$....oo$$$$$$$$$$$""" 
    .......$$$$$$$$$$$$$$$$o....o$$$$$$$""" 
    .........$$$$$$$"""o$$$$$$...$$$$$$ 
    ..........$$$$$$..o$$$$$"....$$$$$ 
    ..........$$$$$$.o$$$$$".....$$$$$.....ooo.oo$$$o 
    ...........$$$$$$$$$$$$$$...$$$$$"...o$$$$$$$$$$$$ 
    .........oo$$$$$$$$$$$""....$$$$$$$$$$$$$$$$$$$$$$ 
    ........."$$$$$$$$$$$ooo....$$$$$$$$$$$$$$$$" 
    ..........."""$$$$$$$$$$$o..$$$$$$$$$$$$$$$$ 
    ...........oo$$$$$$$$$$$$"..$$$$.....$$$$$$$ 
    ......oo$$$$$$$$$$$$$""....o$$$$.....$$$$$$$ 
    .....$$$$$$$$$$$$$$$$oooo..$$$$$.....$$$$$$$ 
    .....$$$$$$$"."$$$$$$$$$$$$$$$$".....$$$$$$$ 
    ......""$$$....$$$$$$."$$$$$$$$......$$$$$$$ 
    ........$$$o..$$$$$$$......$$$$......$$$$$$$ 
    ......."$$$"oo$$$$$$$......$$$"......$$$$$$$ 
    ............$$$$$$$$"......""........$$$$$$" 
    .............""""....................$$$$$" 
    .....................................$$$$" 
    .....................................$$" 
    ....................o$$$o......ooo$$$oo 
    ..................o$$$$$$$oo$$$$$$$$$$$o 
    ................o$$$$$$$$$$$$$$$$$$$$$$$ 
    ..............o$$$$$$"""$$$$$$$$$$$"" 
    ...........o$$$$$"".......""$$$$$$" 
    ..........o$""".............$$$$$$ooo 
    ......................ooooo$$$$$$$$$$$o 
    .....................$$$$$$$$$$$$$$$$$$ 
    .....................$$$$$$$$$$$$$$""" 
    ......................"""""$$$$$$$ 
    ................o$$$o......$$$$$$$.ooooooooooo 
    ................$$$$$$oooo$$$$$$$$$$$$$$$$$$$$$ 
    ............oooo$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 
    .......oo$$$$$$$$$$$$$$$$$$$$$$$$$"""""""""""" 
    .....o$$$$$$$$$$$$$$""""...$$$$$$$ 
    .....$$$$$$$$"""...........$$$$$$$ 
    ......"""""................$$$$$$$ 
    ...........................$$$$$$$ 
    ...........................$$$$$$$ 
    ...........................$$$$$$ 
    ...........................$$$$$" 
    ............................$$$ 
    ..............$$$$$o..........oooo 
    ..............$$$$$$..........$$$$$o 
    .............o$$$$$..........o$$$$$$ 
    .............$$$$$$..........$$$$$$$oooooo 
    .............$$$$$$.......ooo$$$$$$$$$$$$$$$o 
    .......$$o...$$$$$$$$o...$$$$$$$$$$$$$$$$$$$$ 
    ......$$$$...$$$$$$$$$..."$$$$$$$$$$$"$$$$$$" 
    .....o$$$$oo$$$$$$$$$......"$$$$$$"...$$$$$$ 
    .....$$$$$$$$$$$$$$"........$$$$$"..o$$$$$" 
    .....$$$$$$.$$$$$..........$$$$$$$$$$$$$$$$$$$$oo 
    ....."$$$$$.$$$$$.oooo$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 
    ......""""..$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$" 
    ............$$$$$$$$$$$$$$$$$$$"""" 
    ............$$$$$.""""""$$$$$$" 
    ............$$$$$......o$$$$$".....oo$$oo 
    ............$$$$$.....o$$$$$"......$$$$$$$$o 
    ............$$$$$....o$$$$$........"$$$$$$$$o 
    ............$$$$$...o$$$$"...........$$$$$$$$ 
    ............$$$$$...$$$"..............$$$$$$$ 
    .............$$$$...""................"$$$$$ 
    ............."$$"......................"""" 
    .......................$$$$o 
    ......................o$$$$$o.........oooo 
    ..............o$$$....$$$$$$........o$$$$$o 
    .............$$$$$.$$$$$$$$$$$$$o.o$$$$$$" 
    ............$$$$$"o$$$$$$$$$$$$$$$$$$$$"oo 
    ...........$$$$...$$$$$$$$"$$$$$$$$$$"o$$$$o 
    ........o$$$$$..oo$$$$$$$..$$$$$$$$$$o$$$$$ 
    ........$$$$$$$$$$$$$$$$$oo$$$$$$$$$$$$$" 
    ........"$$$$$$$$$$$$$$$$$$$$$$$$.$$$$$$$o 
    ............o$$$$$$$$$$$$""$$$$$$$$$$"$$$$$ 
    ...........o$$$$.o$$$$$$$oo$$$$$$$$$$$$$$$$ 
    ..........o$$$$$$$$$$$$$$$$$$$$$$$$$$"$$$$" 
    .........o$$$$$$$"""$$$$$$$$$$$$""....""" 
    .........."$$""....."$$"$$$$$$ooooooo$$$$$$$$o 
    ...............ooooo$$$$$$$$$$$$$$$$$$$$$$$$$$o 
    .......ooo$$$$$$$$$$$$$$$$$$$$$$$$$$"""""""""" 
    ......o$$$$$$$$$$$$$$"""$$$$$$....o$$$$o 
    ......."$$$$$"$$$$......$$$$$$...."$$$$$$o 
    .........""..$$$$$......$$$$$$.....$$$$$$$o 
    .............$$$$$.....o$$$$$$......$$$$$$$ 
    ............."$$"...ooo$$$$$$$.......$$$$" 
    ...................$$$$$$$$$"........"""   
      

  10.   

    这个是 speech sdk5.1 自带的帮助中 copy 出来的API for Text-to-Speech
    Applications can control text-to-speech (TTS) using the ISpVoice Component Object Model (COM) interface. Once an application has created an ISpVoice object (see Text-to-Speech Tutorial), the application only needs to call ISpVoice::Speak to generate speech output from some text data. In addition, the IspVoice interface also provides several methods for changing voice and synthesis properties such as speaking rate ISpVoice::SetRate, output volume ISpVoice::SetVolume and changing the current speaking voice ISpVoice::SetVoice Special SAPI controls can also be inserted along with the input text to change real-time synthesis properties like voice, pitch, word emphasis, speaking rate and volume. This synthesis up sapi.xsd, using standard XML format, is a simple but powerful way to customize the TTS speech, independent of the specific engine or voice currently in use. The IspVoice::Speak method can operate either synchronously (return only when completely finished speaking) or asynchronously (return immediately and speak as a background process). When speaking asynchronously (SPF_ASYNC), real-time status information such as speaking state and current text location can polled using ISpVoice::GetStatus. Also while speaking asynchronously, new text can be spoken by either immediately interrupting the current output (SPF_PURGEBEFORESPEAK), or by automatically appending the new text to the end of the current output. In addition to the ISpVoice interface, SAPI also provides many utility COM interfaces for the more advanced TTS applications.Events 
    SAPI communicates with applications by sending events using standard callback mechanisms (Window Message, callback proc or Win32 Event). For TTS, events are mostly used for synchronizing to the output speech. Applications can sync to real-time actions as they occur such as word boundaries, phoneme or viseme (mouth animation) boundaries or application custom books. Applications can initialize and handle these real-time events using ISpNotifySource, ISpNotifySink, ISpNotifyTranslator, ISpEventSink, ISpEventSource, and ISpNotifyCallback.Lexicons 
    Applications can provide custom word pronunciations for speech synthesis engines using methods provided by ISpContainerLexicon, ISpLexicon and ISpPhoneConverter. Resources
    Finding and selecting SAPI speech data such as voice files and pronunciation lexicons can be handled by the following COM interfaces: ISpDataKey, ISpRegDataKey, ISpObjectTokenInit, ISpObjectTokenCategory, ISpObjectToken, IEnumSpObjectTokens, ISpObjectWithToken, ISpResourceManager and ISpTask. 
      

  11.   

    好了,已经有朋友发给我这个sdk了,多谢大家了。现在结帐
      

  12.   

    前几天也关注了一下MS Agent,到http://www.microsoft.com/msagent/上面,把相关的东西都当下来了.一般有:
      msAgent核心组件
      MsAgent帮助文件(我想这里有你要的所有文档)
      MsAgent Character Editor
      Microsoft Linguistic Information Sound Editiong Tool
      Microsoft Speech API4.0
      Microsoft Speech Control Panel
      Microsoft Speech Recognition Engine  actcnc
      TTS Eng2Eng engine
      MS agent2.0最最重要的是有Sample:可是货真价实的源码,有java的,mfc的,asp的等等等等.用它不难,不过个人几天的研究结论,似乎是:玩玩挺有意思,用处却不大.就好像金山毒霸2002中那个Agent,真是讨厌.
      

  13.   

    对了,前几天还在计算机世界的网站上看到有人用.net调用Agent的文章.可以用来入门哦.呵呵
      

  14.   

    那个argent是个组件,可以用脚本(vbscript)实现,具体不太记得了。