音声合成器のローダーを表します。
        private static List<IVoiceSynthesizeFactory> LoadDictFromThisAssembly()
        {
            var loader = new VoiceSynthesizerLoader();
            var catalog = new AssemblyCatalog(Assembly.GetExecutingAssembly());
            var container = new CompositionContainer(catalog);
            container.ComposeParts(loader);

            return loader._converters;
        }
        private static List <IVoiceSynthesizeFactory> LoadDictFromThisAssembly()
        {
            var loader    = new VoiceSynthesizerLoader();
            var catalog   = new AssemblyCatalog(Assembly.GetExecutingAssembly());
            var container = new CompositionContainer(catalog);

            container.ComposeParts(loader);

            return(loader._converters);
        }
Esempio n. 3
0
        /// <summary>音声合成の担当インスタンスと設定をもとにインスタンスを初期化します。</summary>
        /// <param name="synther">音声合成の担当インスタンス</param>
        /// <param name="setting">発声の設定</param>
        public VoiceOperator(IVoiceSetting setting)
        {
            _setting = setting;

            AvailableVoices         = VoiceSynthesizerLoader.LoadAvailableVoices();
            AvailableTextConverters = TextToPronounceConverterLoader.LoadAvailableTextConverters();

            _currentSynthesizerName       = setting.VoiceType;
            _textToPronounceConverterName = setting.TextConverterType;
        }
        private static List<IVoiceSynthesizeFactory> LoadDictFromDirectory()
        {
            Directory.CreateDirectory(Path.Combine(PluginDirectoryNames.PluginDirectory, VoicePluginDirectory));

            var loader = new VoiceSynthesizerLoader();
            var catalog = new DirectoryCatalog(Path.Combine(PluginDirectoryNames.PluginDirectory, VoicePluginDirectory));
            var container = new CompositionContainer(catalog);
            container.ComposeParts(loader);

            return loader._converters;
        }
        private static List <IVoiceSynthesizeFactory> LoadDictFromDirectory()
        {
            Directory.CreateDirectory(Path.Combine(PluginDirectoryNames.PluginDirectory, VoicePluginDirectory));

            var loader    = new VoiceSynthesizerLoader();
            var catalog   = new DirectoryCatalog(Path.Combine(PluginDirectoryNames.PluginDirectory, VoicePluginDirectory));
            var container = new CompositionContainer(catalog);

            container.ComposeParts(loader);

            return(loader._converters);
        }