1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim SAPI, fichier_out
SAPI = CreateObject("sapi.spvoice")
SAPI.Speak(TextBox1.Text)
fichier_out = CreateObject("SAPI.SpFileStream")
fichier_out.Open("c:\sortie.wav", 3, False)
SAPI.AudioOutputStream = fichier_out
SAPI.Speak(TextBox1.Text)
fichier_out.close()
End Sub
End Class |
Partager