示例#1
0
        public Voiceroid2Controller(SpeechEngineInfo info)
        {
            Info = info;

            var voiceroid2 = new Voiceroid2Enumerator();

            _promptString = voiceroid2.PromptString;

            VoiceroidPath   = info.EnginePath;
            _libraryName    = info.LibraryName;
            _timer          = new System.Timers.Timer(100);
            _timer.Elapsed += timer_Elapsed;
        }
        public static SpeechEngineInfo[] GetVoiceroid2SpeechEngine()
        {
            List <SpeechEngineInfo> info = new List <SpeechEngineInfo>();

            // VOICEROID2 を列挙
            var voiceroid2 = new Voiceroid2Enumerator();

            if (voiceroid2.GetSpeechEngineInfo().Length > 0)
            {
                info.AddRange(voiceroid2.GetSpeechEngineInfo());
            }

            return(info.ToArray());
        }
        public static SpeechEngineInfo[] GetAllSpeechEngine()
        {
            List <SpeechEngineInfo> info = new List <SpeechEngineInfo>();

            // VOICEROID+ を列挙
            var voiceroidPlus = new VoiceroidPlusEnumerator().GetSpeechEngineInfo();

            if (voiceroidPlus.Length > 0)
            {
                info.AddRange(voiceroidPlus);
            }

            // VOICEROID2 を列挙
            var voiceroid2 = new Voiceroid2Enumerator().GetSpeechEngineInfo();

            if (voiceroid2.Length > 0)
            {
                info.AddRange(voiceroid2);
            }

            var una = new UnaEnumerator().GetSpeechEngineInfo();

            if (una.Length > 0)
            {
                info.AddRange(una);
            }

            //CeVIO を列挙
            var cevio = new CeVIOEnumerator().GetSpeechEngineInfo();

            if (cevio.Length > 0)
            {
                info.AddRange(cevio);
            }

            // SAPI5 を列挙
            var sapi5 = new SAPI5Enumerator();

            info.AddRange(sapi5.GetSpeechEngineInfo());

            return(info.ToArray());
        }