Advertisement
smashapps

Text to Speech

Apr 16th, 2012
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Public Class Form1
  2.  
  3.     Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
  4.         Dim SAPI
  5.         SAPI = CreateObject("SAPI.spvoice")
  6.         SAPI.Speak(TextBox1.Text)
  7.     End Sub
  8.  
  9.     Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click
  10.         Dim SAPI
  11.         SAPI = CreateObject("SAPI.spvoice")
  12.         If TextBox2.Text = "bye" Then
  13.             SAPI.Speak("Thanks for watching this YouTube tutorial by SmashApps.")
  14.         End If
  15.     End Sub
  16. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement