I am able to get the SAPI saying some words. What I need now is for it to record to a file.
Does anyone know how I can do this.
On my Project I have a Text Box, Combo Box, Command Button, Slider Bar and Microsoft Voice Text Control. Here's the code.
Private Sub Form_Load()
Dim strVoiceType As String
Dim intEngine As Integer
Dim i As Integer
intEngine = TextToSpeech1.Find("")
TextToSpeech1.Select intEngine
For i = 1 To TextToSpeech1.CountEngines
strVoiceType = TextToSpeech1.ModeName(i)
Combo1.AddItem strVoiceType
Next i
Combo1.ListIndex = TextToSpeech1.CurrentMode - 1
End Sub
Private Sub speak1()
On Error GoTo ErrHandler
TextToSpeech1.Select Combo1.ListIndex + 1
TextToSpeech1.Speed = Slider1.Value
Me.Caption = Combo1.Text & " @ " & TextToSpeech1.Speed
TextToSpeech1.Speak Text1.Text
Exit Sub
ErrHandler:
MsgBox "This voice is not properly Loaded, Please try another voice", vbOKOnly
End Sub
Private Sub Command1_Click()
speak1
End Sub
Casper
"I feel sorry for people who don't drink. When they wake up in the morning, that's as good as they're going to feel all day."
~Frank Sinatra
Does anyone know how I can do this.
On my Project I have a Text Box, Combo Box, Command Button, Slider Bar and Microsoft Voice Text Control. Here's the code.
Private Sub Form_Load()
Dim strVoiceType As String
Dim intEngine As Integer
Dim i As Integer
intEngine = TextToSpeech1.Find("")
TextToSpeech1.Select intEngine
For i = 1 To TextToSpeech1.CountEngines
strVoiceType = TextToSpeech1.ModeName(i)
Combo1.AddItem strVoiceType
Next i
Combo1.ListIndex = TextToSpeech1.CurrentMode - 1
End Sub
Private Sub speak1()
On Error GoTo ErrHandler
TextToSpeech1.Select Combo1.ListIndex + 1
TextToSpeech1.Speed = Slider1.Value
Me.Caption = Combo1.Text & " @ " & TextToSpeech1.Speed
TextToSpeech1.Speak Text1.Text
Exit Sub
ErrHandler:
MsgBox "This voice is not properly Loaded, Please try another voice", vbOKOnly
End Sub
Private Sub Command1_Click()
speak1
End Sub
Casper
"I feel sorry for people who don't drink. When they wake up in the morning, that's as good as they're going to feel all day."
~Frank Sinatra