text-to-speech problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • zoneal@yahoo.com

    #1

    text-to-speech problem

    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

  • Ken Tucker [MVP]

    #2
    Re: text-to-speech problem

    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.SpVoi ce

    Private Sub Form1_Load(ByVa l sender As System.Object, ByVal e As
    System.EventArg s) Handles MyBase.Load
    tts = New SpeechLib.SpVoi ce
    Dim tMichelle As SpeechLib.SpObj ectToken
    For Each t As SpeechLib.ISpee chObjectToken In tts.GetVoices
    Trace.WriteLine (t.GetDescripti on.ToString)
    If t.GetDescriptio n.ToString = "LH Michelle" Then tMichelle =
    CType(t, SpeechLib.SpObj ectToken)
    Next

    tts.Voice = tMichelle
    btnSay.PerformC lick()
    End Sub

    Private Sub btnSay_Click(By Val sender As System.Object, ByVal e As
    System.EventArg s) Handles btnSay.Click
    tts.Speak(txtSp eak.Text,
    SpeechLib.Speec hVoiceSpeakFlag s.SVSFlagsAsync )
    End Sub

    Ken
    ------------------
    <zoneal@yahoo.c om> wrote in message
    news:1129952332 .199529.251830@ f14g2000cwb.goo glegroups.com.. .[color=blue]
    > 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
    >[/color]


    Comment

    Working...