Make a text to speak program
Heres your chance to share your own tutorials with the community. Just post them on here. If your lucky they may even be posted on the main site.
Hi everyone,
Today i am going to show how to make your program speak...
You need
1 Label (name it "Enter the text to be spoken")
2 buttons (button "Speak" and button 2 "Hello")
1 Text Box
Add this code to the bottm of Public Class Form1
Now add the following code to Button 1
Regards
Shahbaz
Today i am going to show how to make your program speak...
You need
1 Label (name it "Enter the text to be spoken")
2 buttons (button "Speak" and button 2 "Hello")
1 Text Box
Add this code to the bottm of Public Class Form1
Code: Select all
Dim SAPI = CreateObject("SAPI.spvoice")
Now add the following code to Button 1
Code: Select all
Now add the following code to Button 2
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
SAPI.speak(TextBox1.Text)
End Sub
Code: Select all
Thank you Codenstuff and thankyou friendsPrivate Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
SAPI.speak("Hello")
End Sub
Regards
Shahbaz
You can also do this by referencing System.Speech.Synthesis:
Code: Select all
Dim ss As SpeechSynthesizer = New SpeechSynthesizer()
ss.Rate = 1 'speed
ss.Volume = 100
ss.SpeakAsync("test")
how does yours work mandai how can you do the code
Nailing my feet to the floor is easier than using my own muscles to balance, but you don't see me doing that 

How do you do what? Just add the .Net System.Speech reference to your project, put this code in one of your events and import the System.Speech.Synthesis namespace.
how would i change the volume, speed, voice, etc. (in the SAPI Variable)?
Check out http://msdn.microsoft.com/en-us/library ... S.85).aspx
There are volume, rate and voice properties that you can change.
There are volume, rate and voice properties that you can change.
yeah this is a pretty simple code that everyone pretty much knows except of course the noobs but great job on the tut.
------------------------------------------------------------------------------
Proprogrammer, not just a Programmer.
Proprogrammer, not just a Programmer.
Hello everyone,
I have also made a tutorial on a TTS Reader application. You can find it here: viewtopic.php?f=38&t=3908 It's more advanced than this. And also great job shabs!
I have also made a tutorial on a TTS Reader application. You can find it here: viewtopic.php?f=38&t=3908 It's more advanced than this. And also great job shabs!
Hello everyone,
I have also made a tutorial on a TTS Reader application. You can find it here: viewtopic.php?f=38&t=3908 It's more advanced than this. And also great job shabs!
I have also made a tutorial on a TTS Reader application. You can find it here: viewtopic.php?f=38&t=3908 It's more advanced than this. And also great job shabs!
Can you add some other language to it ? For example, have a combobox with languages, and select for example France... so it can read the like France does ;) I think you understand me ! it speaks the with English gramer !
Copyright Information
Copyright © Codenstuff.com 2020 - 2023