这个是 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.
好了,已经有朋友发给我这个sdk了,多谢大家了。现在结帐
前几天也关注了一下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,真是讨厌.
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();
你手头有相关的资料吗?
.............."$$$$$$$$$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$$$$$$$.......$$$$"
...................$$$$$$$$$"........"""
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.
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,真是讨厌.