Wednesday, 25 January 2012

How to speech text in vb.net?

How to speech text in vb.net?
Step1:
Open Microsoft visual studio
Step2:
Click file new àwindows form application àrename it as speech text
Step3:
Drag and drop the one textbox, button from tool box
Step4:
Change text box anchor properties

Step5:
Write the below code on your program window
Public Class Form1

    Private SubButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesButton1.Click

        Dim Speech

        Speech = CreateObject("SAPI.spvoice")

        Speech.Speak(TextBox1.Text)

    End Sub

End Class


Output:

click the speech button to speech