Rated
Read 84,952 times
Contents
Downloads
Related Categories
Text-To-Speech - The Code
The Code
Step 2 - Declaring the Constants
The next step is to add the code. This code will say the caption of the button
and then run a program depending on which button you clicked. Add this code to
the general declarations:
Step 3 - The Code
Now add this code under the click event of btnNumbers:
spkSpeak.Speak "You clicked button number " & btnNumbers(Index).Caption
& "."
Select Case Index + 1
Case Is = 1
Shell Notepad, vbNormalNoFocus
Case Is = 2
Shell Wordpad, vbNormalNoFocus
Case Is = 3
Shell Paint, vbNormalNoFocus
Case Is = 4
Shell Calculator, vbNormalNoFocus
Case Is = 5
Shell Volume, vbNormalNoFocus
Case Is = 6
Shell InternetExplorer, vbNormalNoFocus
Case Is = 7
Shell SoundRecorder, vbNormalNoFocus
Case Is = 8
Shell Clipboard, vbNormalNoFocus
Case Is = 9
Shell Dialer, vbNormalNoFocus
Case Is = 10
Shell Solitaire, vbNormalNoFocus
End Select
|
Then next piece of code will speak the text typed in the text
box. Add this code to the btnSpeak click event:
spkSpeak.Speak txtText.Text
|
Currently programs in VB, QBasic, ASP, PHP, SQL, HTML, CSS, VBScript and some Java/JavaScript. Learning VB.NET.
Comments
-
Posted by California88 on 16 Jul 2008
I ran the program OK. When I create .exe and run on other computers, I get an error. What files are necessary to be installed on the other computers? -
Posted by neal2087 on 24 Mar 2007
thanx for all the info u guys gave this helped me to learn how to use the text-to-speech component the only thin i wanted to know was that how to make the lips move cause i had seen those li... -
hi,
I would like to ask if it is possible to convert the text to spoken voice and save it inside a audio file such as .wav
Thanks in advance
Posted by Nolan on 04 Aug 2005
HI there you need install the text to speech engine and the Microsoft Reader.
[url="http://www.microsoft.com/reader/developers/downloads/tts.asp"]Text -to-Speech Engine installer and Microsoft Reader...
Posted by jjrr007 on 31 Jul 2005
I have installed all prerequisites, added the speech Active X control to the project and installed the voice feature. The updated VB.NET 2003 is available at:
http://cybereshop.lmhost2.com/frmSpeak...
|