Results 1 to 8 of 8

Thread: Text to speech

  1. #1
    howester77 is offline VB.NET Forum Enthusiast
    .NET Framework
    .NET 2.0 (VS 2005)
    Join Date
    Aug 2005
    Posts
    38
    Reputation
    114

    Text to speech

    I am creating a text to speech program using Speechlib, except, I want the program to read the text in a different language, say french. How do I change the Speechlib to french?

  2. #2
    JohnH's Avatar
    JohnH is offline VB.NET Forum Moderator
    .NET Framework
    .NET 4.0
    Join Date
    Dec 2005
    Location
    Norway
    Posts
    14,561
    Reputation
    2736
    I reckon you already got the Speech SDK 5.1. You're lucky, there are not many (free) voices for MS Speech, for ages only the american Mike, Mary and Sam has been available.

    Recently 2005 MS released three new language packages: british, french and german, with two new voices each. Download MS Reader first http://www.microsoft.com/reader/default.asp then one or more of the language packs from http://www.microsoft.com/reader/deve...nloads/tts.asp (it won't install if Reader isn't installed first).

    You can now list and test the voices in Speechlib. The two new french voices are Veronique and Pierre, germans are Stefan and Anna, british are Michael and Michelle.

    As I've heard there exist some "pay-voices" you can search to find also.

  3. #3
    JohnH's Avatar
    JohnH is offline VB.NET Forum Moderator
    .NET Framework
    .NET 4.0
    Join Date
    Dec 2005
    Location
    Norway
    Posts
    14,561
    Reputation
    2736
    I suddenly realized you perhaps didn't talk about the voices themself, but rather translation of the language of the text, well there exist some translator services as webservices where you can connect and get the text translated. Here are some http://www.masternewmedia.org/2001/1...e_services.htm

  4. #4
    howester77 is offline VB.NET Forum Enthusiast
    .NET Framework
    .NET 2.0 (VS 2005)
    Join Date
    Aug 2005
    Posts
    38
    Reputation
    114
    thanks for the link. is there any way to change the speaker? for example, change it from microsoft sam to pierre in your program?

  5. #5
    JohnH's Avatar
    JohnH is offline VB.NET Forum Moderator
    .NET Framework
    .NET 4.0
    Join Date
    Dec 2005
    Location
    Norway
    Posts
    14,561
    Reputation
    2736
    Of course, that's the point of it all.. you'll find it documented in the SDK, here is a small sample for a listbox and a button on a form:
    Code:
     
    'first Add Reference to Microsoft Speech Object Library (COM page listing)
     
    'standard (sender, e) method parameters shortened
     
    Dim s As New SpeechLib.SpVoice
     
    Private Sub Form1_Load(sender, e) Handles MyBase.Load
      Dim tk As SpeechLib.SpObjectToken
      For Each tk In s.GetVoices
        ListBox1.Items.Add(tk.GetDescription)
      Next
    End Sub
     
    Private Sub ListBox1_SelectedIndexChanged(sender, e) Handles ListBox1.SelectedIndexChanged
      s.Voice = s.GetVoices.Item(ListBox1.SelectedIndex)
    End Sub
     
    Private Sub btnSpeak_Click(sender, e) Handles btnSpeak.Click
      s.Speak("Hello, this is a new voice.")
    End Sub
    You can also modify voice parameters like pitch and reading speed with the integrated Xml based voice commands.

  6. #6
    howester77 is offline VB.NET Forum Enthusiast
    .NET Framework
    .NET 2.0 (VS 2005)
    Join Date
    Aug 2005
    Posts
    38
    Reputation
    114
    what are the boundaries of the pitch and speed? volume is between 0 and 100, but speed seems to be infinite?

  7. #7
    JohnH's Avatar
    JohnH is offline VB.NET Forum Moderator
    .NET Framework
    .NET 4.0
    Join Date
    Dec 2005
    Location
    Norway
    Posts
    14,561
    Reputation
    2736
    Rate (speed) and Pitch range from -10 to 10, not easy to find in the docs.
    http://msdn.microsoft.com/library/en...apers/sapi.xsd

  8. #8
    howester77 is offline VB.NET Forum Enthusiast
    .NET Framework
    .NET 2.0 (VS 2005)
    Join Date
    Aug 2005
    Posts
    38
    Reputation
    114
    thanks for the info

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Harvest time tracking