Programmers creating applications using VB.NET, with visual basic coding on Microsoft's .NET platform, can benefit from a range of libraries for common functions including text-to-speech. Text-to-speech is the process of generating, or synthesising, speech from text strings. The speech synthesised is typically output in audio form as part of the application, with the text input provided within the programming code or from user input. Text-to-speech functions are essential in many applications, for example to make textual content accessible to people with visual impairments.
Other People Are Reading
The primary source for text-to-speech in a VB.NET application is provided via Microsoft's Speech application programming interface (API). This API provides Visual Basic .NET developers with a range of classes whose methods automate the complex process of synthesising audio speech output from textual input data. By making use of the Microsoft Speech API, the amount of programming code required for an application is massively reduced when compared to implementing speech synthesis natively. The Microsoft Speech API provides speech recognition for audio input as well as text-to-speech functionality for audio voice output.
To make use of Microsoft's Speech API, a developer can use the ISpVoice interface, which uses the Component Object Model (COM), common to Microsoft resources and therefore familiar to many VB.NET programmers. Application code can create ISpVoice objects, through which speech synthesis is accessible. The ISpVoice class provides a range of methods for controlling voice output as part of a text-to-speech operation.
The ISpVoice class methods allow developers to synthesise speech from text input and to control the details of the text-to-speech output. The main method involved in text-to-speech programming is the Speak method. With the Speak method, developers can include parameters indicating the text string to synthesise as speech output or the location of a file. When the method receives the location of a file, the application will attempt to speak the contents of the file. Additional parameters to the Speak method allow developers to configure the rendering procedure through flag values and a number representing any existing text-to-speech stream for managing queues of output streams.
The ISpVoice class presents various options to the text-to-speech developer. By including XML-formatted code, developers can control aspects of the speech synthesis such as rate, pitch, volume, voice and word emphasis. Speaking operations can execute either synchronously or asynchronously depending on the needs of the application. Application code can monitor text-to-speech output using the ISpVoice callback events in real-time, making the speech synthesised execute in conjunction with other application components if necessary. Additional classes provide control over audio output hardware options and lexicons.
- 20 of the funniest online reviews ever
- 14 Biggest lies people tell in online dating sites
- Hilarious things Google thinks you're trying to search for