Export (0) Print
Expand All

TTSApp (SAPI 5.3)

Speech API 5.3
Microsoft Speech API 5.3

TTSApp

TTSApp is an example of a text-to-speech (TTS) enabled application. This sample application is intended to demonstrate many of the features for SAPI 5 in a single coherent application. It is not a full featured TTS-enabled application although the foundations of many of the options are present.

TTSApp allows you to hear the resulting audio output from the TTS process for text entered in the main window. Alternatively, you can open a file and TTSApp will speak the contents of that file.

Each word is highlighted in the text window to indicate the current TTS processing position. Features include:

SAPI5 TTSAppThe main display window of the TTSApp sample application.
Text windowTTSApp speaks the text contained in this window using TTS.
SpeakInitiates the TTS process.
VoicesSelects the voice for the audio output.
RateSelects the rate of speech.
VolumeSelects the volume level of the audio output stream.
Open FileEnables TTSApp to open and speak the contents of a stored text file.
PausePauses the TTSApp text phrase speaking process.
ResumeResumes the TTSApp text phrase speaking process.
StopStops the TTSApp text phrase speaking process.
AboutDisplays the About TTSApp information dialog box.
FormatSelects the audio format.
SkipSpecifies the number of sentences to skip in the phrase speaking process.
Speak wavSpeaks the contents of a stored wav file.
ResetResets TTSApp to its original configuration setting.
Save to wavSaves the contents of the TTSApp audio output stream to a wav file.
Show all eventsDisplays all TTSApp SAPI events.
Process XMLSpecifies that the TTS voice will speak the XML tags and their contents in the TTS process.
Mouth PositionDisplays mouth shapes for phrase elements as they are spoken.
ms720410.TTSapp_Main(en-us,VS.85).gif
SAPI5 TTSApp main window.
Use the main TTSApp window to select the configuration settings that affect the TTS process. The elements of TTSApp are listed above. Click the text in the left column for additional information.
ms720410.TTSApp_TextWindow(en-us,VS.85).gif
Text window
The text content of this window is spoken by TTSApp. All text entered in this window is processed and spoken by TTSApp voice.
By default, the text content of this window is, "Enter the text you wish spoken here."
ms720410.Btn_Speak(en-us,VS.85).gif
Speak
Click Speak to initiate the text-to-speech process.
ms720410.Drp_Voices(en-us,VS.85).gif
Voices
Select a voice using the drop-down list. TTSApp uses the selected voice when speaking a wav file or the contents of the text window.
ms720410.Sld_Rate(en-us,VS.85).gif
Rate
Move the slide control to the right to increase the speech rate, and to the left to decrease the speech rate. The Rate level determines the number of text units spoken per minute.
ms720410.Sld_Volume(en-us,VS.85).gif
Volume
Move the slide control to the right to increase the volume level, and to the left to decrease the volume level.
ms720410.Btn_Open(en-us,VS.85).gif
Open File
Click Open File to access the Windows Open dialog box. Select the file, and then click Open.
ms720410.Btn_Pause(en-us,VS.85).gif
Pause
Click Pause to interrupt the TTS process.
ms720410.Btn_Resume(en-us,VS.85).gif
Resume
Click Resume to continue the TTS process.
ms720410.Btn_Stop(en-us,VS.85).gif
Stop
Click Stop to stop the TTS process.
ms720410.TTSapp_About_shad(en-us,VS.85).gif
ms720410.Btn_About(en-us,VS.85).gif
About
The About window displays information related to TTSApp. Click OK to close the About window.
ms720410.Drp_Format(en-us,VS.85).gif
Format
Use the drop-down list in Format to select one of the following format rates.
Selectable format rates
8kHz8 Bit Mono8 Bit Stereo16 Bit Mono16 Bit Stereo
11kHz8 Bit Mono8 Bit Stereo16 Bit Mono16 Bit Stereo
12kHz8 Bit Mono8 Bit Stereo16 Bit Mono16 Bit Stereo
16kHz8 Bit Mono 8 Bit Stereo16 Bit Mono16 Bit Stereo
22kHz8 Bit Mono8 Bit Stereo16 Bit Mono16 Bit Stereo
24kHz8 Bit Mono8 Bit Stereo16 Bit Mono16 Bit Stereo
32kHz8 Bit Mono8 Bit Stereo16 Bit Mono16 Bit Stereo
44kHz8 Bit Mono8 Bit Stereo16 Bit Mono16 Bit Stereo
48kHz8 Bit Mono8 Bit Stereo16 Bit Mono16 Bit Stereo
ms720410.Btn_Skip_Spin(en-us,VS.85).gif
Skip
Use the spin box to select the number of skipped sentences. Skip functions only while text is being spoken.
ms720410.Btn_Speak_Wav(en-us,VS.85).gif
Speak wav
Speak wav enables TTSApp to speak the contents of a wav file. Click Speak wav to access the Windows Open dialog box. Select a wav file from the dialog box, and then click Open.
ms720410.Btn_Reset(en-us,VS.85).gif
Reset
Click Reset to reset TTSApp to its original configuration state.
ms720410.Btn_Save_Wav(en-us,VS.85).gif
Save to wav
Click Save to wav to save the TTSApp audio output stream to a wav file.
ms720410.TTSapp_ShowEvents(en-us,VS.85).gif
Show all events
Select Show all events to display SAPI related events in the event display window as the input text is processed by TTSApp.
ms720410.TTSapp_SpeakXML(en-us,VS.85).gif
Process XML
Select Process XML to include the XML tags and their contents in the audio output stream from TTSApp. When this option is selected, the application will parse and interpret the XML tags literally.

For example, if the Process XML option is selected, the application could be paused for the specified number of milliseconds in the SILENCE tag.

Process XML  XML tag  Result
ms720410.TTSapp_SpeakXML(en-us,VS.85).gif<SILENCE MSEC = "3000"/>The application would speak 3000 milliseconds of silence.
ms720410.TTSapp_SpeakXML_NotSelected(en-us,VS.85).gif<SILENCE MSEC = "3000"/>The application will speak the phrase, "less than silence msec equals quote three thousand quote slash greater than."
ms720410.TTSapp_Mouth(en-us,VS.85).gif
Mouth Position
The mouth position displays the various mouth shapes and positions as TTSApp processes the input text stream.
Show:
© 2014 Microsoft