Text To Speech
Glossary Item Box
VPL User Interface Services: Speech Recognition
Microsoft Robotics Developer Studio | Send feedback on this topic |
Text To Speech
The Text to Speech service is designed to provide your applications with a verbal interface. It can be used in conjunction with the Speech Recognizer service for two-way communication with the computer.
When the service is running you can inspect it by typing the following Uniform Resource Identifier (URI) into your web browser's address bar:
https://localhost:50000/texttospeech
This displays the Text To Speech web page, as shown in the screenshot below. It will show you the state of the speech object (which includes the last text spoken), as well as various other speech parameters.
You can make changes using the web page, and also test out the TextToSpeech service by entering some text and pressing the Say button.
Requests
The available operations for the Text To Speech service include the following:
Request | Description |
---|---|
SayText | Says the specified text |
SayTextSynch | Says the specified text but does not send a response until the speaking has finished. If you are using the service from VPL you might find this operation useful because program execution can be suspended until the response is received from the Text To Speech service. |
SetRate | Sets the speed at which text is spoken |
SetVolume | Sets the sound volume |
SetVoice | Selects a particular voice |
Notifications
The Text To Speech service allows other services to subscribe to it. Subscribers will be notified of state updates as well as of viseme states as speech is synthesized. Whereas phonemes are the basic acoustic unit of speech, visemes are the basic visual unit of speech. Thus, a viseme describes a particular facial and oral expression that occurs alongside the voicing of phonemes.
The VisemeNotify messages can be used to assist with displaying a facial representation during speech. The service does not provide a simulated face, so you will have to write your own code for this.
Speech Parameters
As with most services, the speech parameters can be set in a configuration file. (Use the Set Configuration option in the Properties panel). Alternatively, the speech parameters can be modified through messages. The parameters include:
Volume
Changes the volume of the voice.
Valid range is 0 through 100.Rate
Changes the speed at which the text is read.
Valid range is from -10 to 10.Voice
Changes the speaker's voice.
Possible voices may include:- LH Michael
- LH Michelle
- Microsoft Anna
- Microsoft Mary
- Microsoft Mike
- Microsoft Sam
- Sample TTS Voice
Short names may be used. For example, Mike may be used to select Microsoft Mike.
Note: You might only have one of these voices on your system.
See Also |
VPL User Interface Services: Speech Recognition
© 2012 Microsoft Corporation. All Rights Reserved.