Ejemplo n.º 1
0
 private static void SpeakByYukkuri(TTSMessage.SpeakEventArg e)
 {
     lock (lockObject)
     {
         YukkuriController.Default.OutputWaveToFile(
             e.TextToSpeack,
             (ushort)e.SpeakSpeed,
             e.WaveFile);
     }
 }
Ejemplo n.º 2
0
        private static void message_OnSpeak(TTSMessage.SpeakEventArg e)
        {
            switch (e.TTSType)
            {
                case TTSTEngineType.Yukkuri:
                    SpeakByYukkuri(e);
                    break;

                case TTSTEngineType.CeVIO:
                    SpeakBySasara(e);
                    break;
            }
        }
Ejemplo n.º 3
0
        public static void Main(string[] args)
        {
            channel = new IpcServerChannel("TTSYukkuriChannel");

            ChannelServices.RegisterChannel(channel, true);

            var message = new TTSMessage();
            RemotingServices.Marshal(message, "message", typeof(TTSMessage));

            message.OnIsReady += () => { return true; };
            message.OnSpeak += message_OnSpeak;
            message.OnGetSasaraSettings += message_OnGetSasaraSettings;
            message.OnSetSasaraSettings += message_OnSetSasaraSettings;
            message.OnStartSasara += message_OnStartSasara;
            message.OnCloseSasara += message_OnCloseSasara;
            message.OnEnd += message_OnEnd;

            Console.WriteLine("Listening on " + channel.GetChannelUri());

            // 終了を待つ
            Console.ReadLine();
        }
Ejemplo n.º 4
0
        private static void SpeakBySasara(TTSMessage.SpeakEventArg e)
        {
            lock (lockObject)
            {
                SasaraController.Default.OutputWaveToFile(
                    e.TextToSpeack,
                    e.WaveFile);

                isSasaraStarted = true;
            }
        }
Ejemplo n.º 5
0
 private static void message_OnSetSasaraSettings(TTSMessage.SasaraSettingsEventArg e)
 {
     SasaraController.Default.SetSasaraSettings(e.Settings);
     isSasaraStarted = true;
 }