Bellow is the simple function to make texts that user input will be read with computer and translate it into voice.
Private Sub talk(ByVal str As String)
Dim oVoice As New SpeechLib.SpVoice
Dim cpFileStream As New SpeechLib.SpFileStream
'Set the voice type male or female and etc
oVoice.Voice = oVoice.GetVoices.Item(cmbVoices.SelectedIndex)
'Set the voice volume
oVoice.Volume = trVolume.Value
'Set the text that will be read by computer
oVoice.Speak(str, SpeechLib.SpeechVoiceSpeakFlags.SVSFDefault)
oVoice = Nothing
End Sub
To use this simple function, just insert the text that we want to be readed into function parameter
Example : talk("Hello World") ' This Function will make computer talk "Hello World"
For demo Aplication Click here to download file
For Source Code Click here to download file
If you find an interesting things please share with me..^^
1 comment:
Keren Neh!
Thnx Bro ..
Salam
Post a Comment