音声合成用の文字列に前処理をかけるプラグインのローダーを表します。
        private static List<ITextToPronounceConverterFactory> LoadDictFromThisAssembly()
        {
            var loader = new TextToPronounceConverterLoader();
            var catalog = new AssemblyCatalog(Assembly.GetExecutingAssembly());
            var container = new CompositionContainer(catalog);
            container.ComposeParts(loader);

            return loader._converters;
        }
예제 #2
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 <ITextToPronounceConverterFactory> LoadDictFromThisAssembly()
        {
            var loader    = new TextToPronounceConverterLoader();
            var catalog   = new AssemblyCatalog(Assembly.GetExecutingAssembly());
            var container = new CompositionContainer(catalog);

            container.ComposeParts(loader);

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

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

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

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

            container.ComposeParts(loader);

            return(loader._converters);
        }