By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,376 Members | 1,537 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,376 IT Pros & Developers. It's quick & easy.

text-to-speech problem

P: n/a
i'm developing a text-to-speech for my system. i use the text-to-speech
component from the .net. but the voice sometimes is mary and sometimes
is sam. Is there any way to default the voice i use in vb.net.

thanks

Nov 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hi,

I use the speech sdk 5.1 for text to speech. Here is how you could
set the voice to LH Michelle.

Dim tts As SpeechLib.SpVoice

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
tts = New SpeechLib.SpVoice
Dim tMichelle As SpeechLib.SpObjectToken
For Each t As SpeechLib.ISpeechObjectToken In tts.GetVoices
Trace.WriteLine(t.GetDescription.ToString)
If t.GetDescription.ToString = "LH Michelle" Then tMichelle =
CType(t, SpeechLib.SpObjectToken)
Next

tts.Voice = tMichelle
btnSay.PerformClick()
End Sub

Private Sub btnSay_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnSay.Click
tts.Speak(txtSpeak.Text,
SpeechLib.SpeechVoiceSpeakFlags.SVSFlagsAsync)
End Sub

Ken
------------------
<zo****@yahoo.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
i'm developing a text-to-speech for my system. i use the text-to-speech
component from the .net. but the voice sometimes is mary and sometimes
is sam. Is there any way to default the voice i use in vb.net.

thanks

Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.