Code:
Public Class Form1Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.LoadEnd ClassDim SAPIEnd Sub
SAPI = CreateObject("SAPI.spvoice")
SAPI.speak("Hello World!")
Run the program and you will hear a voice saying "Hello World!".
You can also direct it to Label's text (e.g. SAPI.speak(Label1.Text)) and the text on the Label will be spoken.
If this post helped you please take few seconds to share it! :)
No comments:
Post a Comment