怎么做啊??
在CSDN上有这样的代码:
spvoice1.Voice := spvoice1.GetVoices('','').Item(i); //i为0到3  每个试听一下,只到发中文为止
SpVoice1.Speak('你好', 1 );但我没看懂,因为不知道spvoice1是什么类型的变量,哪位大虾帮帮忙!!!!

解决方案 »

  1.   

    我印象中tts只支持英文的吧。
      

  2.   

    ★★朋友,我写过这个程序,你可以到以下地址下载她
    名称:TTS-Reader1.0 地址(电脑之家) 
    软件大小:1.79M
    下载地址 http://download.pchome.net/home/voice/14430.html下面的链接可下载TTS-Reader1.5全部源码
    下载地址http://bbs.2ccc.com/upload/isxuzhu/TTS-Reader1.5(EXE及源码).rar
    压缩包大小:304K
    ★★注:若想正常使用1.5版,请先下载1.0版,因为1.0版自带中文语音库。安装完1.0版后1.5版可正常使用。
    若对相关语音控件不清楚,请到下面的地址看看
      http://expert.csdn.net/Expert/topic/1321/1321906.xml?temp=.650799
      

  3.   

    re:我执行了上面的代码后没有反应啊,还有哪个i是怎么设置的?????1、必须使用中文语音库才能读中文。
    2、i代表你电脑上语音库的序号。例如XP下,打开控制面板的语音,在语音选择下拉条中起码可以看到四个选项,前3个是发英文,第4个是Micrsoft simplified Chinese发中文,你选择第4个。程序里这样写就OK了
    spvoice1.speak('你好',1);
      

  4.   

    先装个TTS中文包,及SAPI4.0以上版本
    中文发音:SpVoice1.Speak('<LANG LANGID="804">'+中文字串,1);
    英文发音:SpVoice1.Speak('<LANG LANGID="409">'+中文字串,1);{或者不加语言编码}TTS和SAPI5.1要的话找我
      

  5.   

    我下在了一个Microsoft Speech SDK 5.1.msi,可是我安装后怎么在Delphi的Project<Import Type Library>看到的还是Micosoft Speech Object Library[Version5.0]啊,是怎么回事啊???我都急死了!!!!
      

  6.   

    Because SAPI 5.1 is a superset of SAPI 5.0, the two versions can coexist on the same machine. But if both SAPI 5.0 and SAPI 5.1 are installed on the same machine, uninstalling either version could damage the other installation and require it to be reinstalled. For this reason, we recommend that you uninstall SAPI 5.0 before installing SAPI 5.1.
       When English Office XP and SAPI 5.1 reside on a computer with a non-English version of Windows, removing SAPI 5 or an application which removes SAPI 5 could cause Office Speech to fail. If this occurs, use Office's "Detect and Repair" program.   None of the SAPI 5.1 components or compliance tests were tested with power-managed (OnNow) computers. As long as the system determines that there is application activity, it will not put the system or any devices into the sleeping state. However, if you encounter unexpected performance issues while using power management, OnNow should be disabled.   Occasionally, it can be difficult to uninstall a previous release of the Microsoft Speech SDK 5.0. Subsequently, install the Speech SDK 5.1. Here are two options:   (i) Run the application Regedit.exe. Delete all entries under HKEY_CURRENT_USER\Software\Microsoft\Speech\RecoProfiles\Tokens. Deleting the contents of this registry key removes the speech recognition profiles. Next, install the Speech SDK 5.1.  (ii) If your problem continues, delete the HKEY_CURRENT_USER\Software\Microsoft\Speech and the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech keys.    Then try installing the Speech SDK 5.1 .