locked
How to add french tts

    Question

  • Hi

    Hello everybody,

    I'm developping my first windows 8.1 app.

    I use the SpeechSynthesizer but the french tts is not available, only the english tts are installed.

    I have download MSSpeech_TTS_fr-FR_Hortense.msi but it doesn't run ??

    How can I insatall or embed the french tts?

    Thanks for help.

    Regards.

    Bachir.

    Sunday, May 11, 2014 5:11 PM

Answers

  • If you watch that Video carefully then you would know that you need to have required TTS installed on each client machine, there is no way to embed it.

    If this is something that you do not want then I have seen one sample using google translate Text to speech in Windows Store apps using Google TTS. I have not tried it but you may want to try and see if that helps :)

    Steps to add new Language & related TTS to System

    1) Search for "region and language settings"
    2) Add a language
    3) Select one that you need
    4) On newly added language click on Options and download Language Pack
    5) Download and install latest TTS for your desired language from Microsoft Speech Platform - Runtime Languages (Version 11)
    6) Search for "Text to Speech" and launh the app.
    7) Make sure TTS is working for your language by selecting respective voice. I tried "Comment vas-tu?" for french
    8) Write your app as shown in Video Make Your Windows Store App Talk with Speech Synthesis

    Some changes in code shown in Video:

    using System;
    using System.Linq;
    using Windows.Media.SpeechSynthesis;
    using Windows.UI.Xaml;
    using Windows.UI.Xaml.Controls;
    
    // The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238
    
    namespace BingTextToSpeech
    {
        /// <summary>
        /// An empty page that can be used on its own or navigated to within a Frame.
        /// </summary>
        public sealed partial class MainPage : Page
        {
            SpeechSynthesizer speechSynthesizer;
            MediaElement mediaElement;
    
            public MainPage()
            {
                this.InitializeComponent();
    
                speechSynthesizer = new SpeechSynthesizer();
                VoiceInformation frenchVoice = (from v in SpeechSynthesizer.AllVoices where v.Language == "fr-FR" select v).FirstOrDefault();
    
                speechSynthesizer.Voice = frenchVoice;
                mediaElement = new MediaElement();
            }
    
            private async void BthHello_Tapped(object sender, RoutedEventArgs e)
            {
                SpeechSynthesisStream stream = await speechSynthesizer.SynthesizeTextToStreamAsync("Comment vas-tu?");
                mediaElement.SetSource(stream, stream.ContentType);
                mediaElement.Play();
            }
        }
    }

    This works!!! :)


    -- Vishal Kaushik --

    Please 'Mark as Answer' if my post answers your question and 'Vote as Helpful' if it helps you. Happy Coding!!!



    Monday, May 12, 2014 8:04 AM

All replies

  • Hope you have referred Speech synthesis sample and Make Your Windows Store App Talk with Speech Synthesis

    I think that should help if you have not followed them. Still if problem exists then please come back with a sample that you have created and is not working for you.


    -- Vishal Kaushik --

    Please 'Mark as Answer' if my post answers your question and 'Vote as Helpful' if it helps you. Happy Coding!!!



    Sunday, May 11, 2014 6:00 PM
  • Hi,

    My app work well for english text to speech, but the texte to speech french voice is not installed. 

    Tn the control panel, in the texte to speech properties only and only english voices are installed.

                    //Query for  a voice that speaks French.
                    frenchVoice = from voice in SpeechSynthesizer.AllVoices
                                  where voice.Language == "fr-FR"
                                  select voice;

    the french voice is not selected because it doesn't exists.

    Regards

    Sunday, May 11, 2014 7:03 PM
  • If you watch that Video carefully then you would know that you need to have required TTS installed on each client machine, there is no way to embed it.

    If this is something that you do not want then I have seen one sample using google translate Text to speech in Windows Store apps using Google TTS. I have not tried it but you may want to try and see if that helps :)

    Steps to add new Language & related TTS to System

    1) Search for "region and language settings"
    2) Add a language
    3) Select one that you need
    4) On newly added language click on Options and download Language Pack
    5) Download and install latest TTS for your desired language from Microsoft Speech Platform - Runtime Languages (Version 11)
    6) Search for "Text to Speech" and launh the app.
    7) Make sure TTS is working for your language by selecting respective voice. I tried "Comment vas-tu?" for french
    8) Write your app as shown in Video Make Your Windows Store App Talk with Speech Synthesis

    Some changes in code shown in Video:

    using System;
    using System.Linq;
    using Windows.Media.SpeechSynthesis;
    using Windows.UI.Xaml;
    using Windows.UI.Xaml.Controls;
    
    // The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238
    
    namespace BingTextToSpeech
    {
        /// <summary>
        /// An empty page that can be used on its own or navigated to within a Frame.
        /// </summary>
        public sealed partial class MainPage : Page
        {
            SpeechSynthesizer speechSynthesizer;
            MediaElement mediaElement;
    
            public MainPage()
            {
                this.InitializeComponent();
    
                speechSynthesizer = new SpeechSynthesizer();
                VoiceInformation frenchVoice = (from v in SpeechSynthesizer.AllVoices where v.Language == "fr-FR" select v).FirstOrDefault();
    
                speechSynthesizer.Voice = frenchVoice;
                mediaElement = new MediaElement();
            }
    
            private async void BthHello_Tapped(object sender, RoutedEventArgs e)
            {
                SpeechSynthesisStream stream = await speechSynthesizer.SynthesizeTextToStreamAsync("Comment vas-tu?");
                mediaElement.SetSource(stream, stream.ContentType);
                mediaElement.Play();
            }
        }
    }

    This works!!! :)


    -- Vishal Kaushik --

    Please 'Mark as Answer' if my post answers your question and 'Vote as Helpful' if it helps you. Happy Coding!!!



    Monday, May 12, 2014 8:04 AM