SwiFt
Rank Recovery Specialist
2
MONTHS
2 2 MONTHS OF SERVICE
LEVEL 1
300 XP
This is my another tutorial in VB.NET that converts an inputted text into a speech or voice. We will just only call the Speech API namespace for this program and with the use of Spvoice object. The SpVoice object brings the text-to-speech (TTS) engine capabilities to applications using SAPI automation. An application can create numerous SpVoice objects, each independent of and capable of interacting with the others. A SpVoice object usually referred to simply as a voice, is created with default property settings so that it is ready to speak immediately.
So, now let's start this tutorial!
Explanation:
We have initialized a tts variable to create an object of SAPI.spvoice. A SAPI.spvoice is created with its audio output set to the system default audio output. It also determines what other outputs are available to the voice, and use another property to set its audio output to one of them.
The Speak method here places a text stream in the TTS engine's input queue of our inputted text in TextBox1 and returns a stream number. It can be called synchronously or asynchronously. When called synchronously, the Speak method returns immediately, and the voice speaks as a background process.
Output:
Click the button to speak the inputted text.
DEMO
You can also download the source code below and try it! :)
For more inquiries and need programmer for your thesis systems in any kind of programming languages, just contact my number below.
Best Regards,
Engr. Lyndon R. Bermoy
IT Instructor/System Developer/Android Developer
Mobile: 09079373999
Telephone: 826-9296
E-mail:[email protected]
Visit and like my page on Facebook at: Bermz ISware Solutions
Subscribe at my YouTube Channel at: SerBermz
Download
So, now let's start this tutorial!
- Let's start with creating a Windows Form Application for this tutorial by following the following steps in Microsoft Visual Studio: Go to File, click New Project, and choose Windows Application.
- Next, add one TextBox named TextBox1 for inputting a text to become a speech, and add one button named Button1 to convert the inputted text into speech. Design your layout like this one below:
- Put this code to your Button1_Click. This will trigger to speak your inputted text.
- Private
Sub
Button1_Click(
ByVal
sender As
System.
Object
, ByVal
e As
System.
EventArgs
)
Handles
Button1.
Click
- Dim
tts =
CreateObject
(
"SAPI.spvoice"
)
- tts.
speak
(
TextBox1.
Text
)
- End
Sub
- Private
Explanation:
We have initialized a tts variable to create an object of SAPI.spvoice. A SAPI.spvoice is created with its audio output set to the system default audio output. It also determines what other outputs are available to the voice, and use another property to set its audio output to one of them.
The Speak method here places a text stream in the TTS engine's input queue of our inputted text in TextBox1 and returns a stream number. It can be called synchronously or asynchronously. When called synchronously, the Speak method returns immediately, and the voice speaks as a background process.
Output:
Click the button to speak the inputted text.

DEMO
You can also download the source code below and try it! :)
For more inquiries and need programmer for your thesis systems in any kind of programming languages, just contact my number below.
Best Regards,
Engr. Lyndon R. Bermoy
IT Instructor/System Developer/Android Developer
Mobile: 09079373999
Telephone: 826-9296
E-mail:[email protected]
Visit and like my page on Facebook at: Bermz ISware Solutions
Subscribe at my YouTube Channel at: SerBermz
Download
You must upgrade your account or reply in the thread to view hidden text.