예제 #1
0
        public void AttachToAct(FoxTTSPlugin plugin)
        {
            _plugin     = plugin;
            _controller = plugin.Controller;

            _controller.PreProcessorSettingsChanged += _controller_PreProcessorSettingsChanged;
        }
예제 #2
0
        public void PostAttachToAct(FoxTTSPlugin plugin)
        {
            var settings = plugin.Settings.SApi5Settings;

            trackBarSpeed.SetValue(settings.Rate, 0);
            comboBoxPitch.SelectedIndex = ((int)settings.Pitch).Clamp(0, comboBoxPitch.Items.Count - 1);
            trackBarVolume.SetValue(settings.Volume, 100);
            var selectedVoice = (comboBoxPerson.DataSource as List <VoiceVM>).FirstOrDefault(it => it.Id == settings.Voice);

            if (selectedVoice == null)
            {
                if (comboBoxPerson.Items.Count > 0)
                {
                    comboBoxPerson.SelectedIndex = 0;
                }
            }
            else
            {
                comboBoxPerson.SelectedValue = selectedVoice.Id;
            }

            trackBarSpeed.ValueChanged          += OnValueChanged;
            comboBoxPitch.SelectedIndexChanged  += OnValueChanged;
            trackBarVolume.ValueChanged         += OnValueChanged;
            comboBoxPerson.SelectedIndexChanged += OnValueChanged;

            OnValueChanged(null, EventArgs.Empty);
        }
예제 #3
0
        public void PostAttachToAct(FoxTTSPlugin plugin)
        {
            var settings = plugin.Settings.BaiduTtsSettings;

            textBoxApiKey.Text    = settings.ApiKey;
            textBoxSecretKey.Text = settings.SecretKey;
            trackBarSpeed.SetValue(settings.Speed, 5);
            trackBarPitch.SetValue(settings.Pitch, 5);
            trackBarVolume.SetValue(settings.Volume, 5);
            comboBoxPerson.SelectedIndex = settings.Person.Clamp(0, comboBoxPerson.Items.Count - 1);
            checkBoxUseHttps.Checked     = settings.UseHttps;

            textBoxApiKey.TextChanged           += OnValueChanged;
            textBoxSecretKey.TextChanged        += OnValueChanged;
            trackBarSpeed.ValueChanged          += OnValueChanged;
            trackBarPitch.ValueChanged          += OnValueChanged;
            trackBarVolume.ValueChanged         += OnValueChanged;
            comboBoxPerson.SelectedIndexChanged += OnValueChanged;
            checkBoxUseHttps.CheckedChanged     += OnValueChanged;

            OnValueChanged(null, EventArgs.Empty);

            checkBoxApiKey_CheckedChanged(null, EventArgs.Empty);

            if (string.IsNullOrWhiteSpace(settings.ApiKey) || string.IsNullOrWhiteSpace(settings.SecretKey))
            {
                NotifyEmptyApiKey();
            }
        }
예제 #4
0
        public void PostAttachToAct(FoxTTSPlugin plugin)
        {
            var settings = plugin.Settings.EdgeTtsSettings;

            trackBarSpeed.SetValue(settings.Speed, 100);
            trackBarPitch.SetValue(settings.Pitch, 100);
            trackBarVolume.SetValue(settings.Volume, 50);
            var selectedVoice = (comboBoxPerson.DataSource as Voice[]).FirstOrDefault(it => it.Value == settings.Voice);

            if (selectedVoice == null)
            {
                if (comboBoxPerson.Items.Count > 0)
                {
                    comboBoxPerson.SelectedIndex = 0;
                }
            }
            else
            {
                comboBoxPerson.SelectedValue = selectedVoice.Value;
            }

            trackBarSpeed.ValueChanged          += OnValueChanged;
            trackBarPitch.ValueChanged          += OnValueChanged;
            trackBarVolume.ValueChanged         += OnValueChanged;
            comboBoxPerson.SelectedIndexChanged += OnValueChanged;

            OnValueChanged(null, EventArgs.Empty);
        }
예제 #5
0
        public void PostAttachToAct(FoxTTSPlugin plugin)
        {
            _settingsControl.PostAttachToAct(plugin);

            _settingsControl.DoLocalization();

            _keepAlive.StartWorkingThread(this);
        }
예제 #6
0
        public void AttachToAct(FoxTTSPlugin plugin)
        {
            _plugin = plugin;

            var parentPanel = plugin.EngineSettingsPanel;

            parentPanel.Controls.Add(this);
            Dock = DockStyle.Top;
        }
예제 #7
0
        public void AttachToAct(FoxTTSPlugin plugin)
        {
            _plugin = plugin;

            var parentPanel = plugin.EngineSettingsPanel;

            parentPanel.Controls.Add(this);
            parentPanel.Resize += ParentPanelOnResize;
            ParentPanelOnResize(parentPanel, null);
        }
예제 #8
0
        public void PostAttachToAct(FoxTTSPlugin plugin)
        {
            var settings = plugin.Settings.BaipiaoSettings;

            trackBarSpeed.SetValue(settings.Speed, 5);

            trackBarSpeed.ValueChanged += OnValueChanged;

            OnValueChanged(null, EventArgs.Empty);
        }
예제 #9
0
        public void PostAttachToAct(FoxTTSPlugin plugin)
        {
            var settings = plugin.Settings.AiCloudTtsSettings;

            trackBarSpeed.SetValue(settings.Speed, 10);
            trackBarPitch.SetValue(settings.Pitch, 10);
            trackBarVolume.SetValue(settings.Volume, 10);
            comboBoxPerson.SelectedIndex = settings.Person.Clamp(0, comboBoxPerson.Items.Count - 1);
            txtBoxProxy.Text             = settings.Proxy;

            trackBarSpeed.ValueChanged          += OnValueChanged;
            trackBarPitch.ValueChanged          += OnValueChanged;
            trackBarVolume.ValueChanged         += OnValueChanged;
            comboBoxPerson.SelectedIndexChanged += OnValueChanged;
            txtBoxProxy.TextChanged             += OnValueChanged;

            OnValueChanged(null, EventArgs.Empty);
        }
예제 #10
0
        public void PostAttachToAct(FoxTTSPlugin plugin)
        {
            var settings = plugin.Settings.BaiduTtsSettings;

            textBoxApiKey.Text    = settings.ApiKey;
            textBoxSecretKey.Text = settings.SecretKey;
            trackBarSpeed.SetValue(settings.Speed, 5);
            trackBarPitch.SetValue(settings.Pitch, 5);
            trackBarVolume.SetValue(settings.Volume, 5);
            comboBoxPerson.SelectedIndex = settings.Person.Clamp(0, 3);

            textBoxApiKey.TextChanged           += OnValueChanged;
            textBoxSecretKey.TextChanged        += OnValueChanged;
            trackBarSpeed.ValueChanged          += OnValueChanged;
            trackBarPitch.ValueChanged          += OnValueChanged;
            trackBarVolume.ValueChanged         += OnValueChanged;
            comboBoxPerson.SelectedIndexChanged += OnValueChanged;

            OnValueChanged(null, EventArgs.Empty);
        }
예제 #11
0
        public void PostAttachToAct(FoxTTSPlugin plugin)
        {
            var settings = plugin.Settings.XfyunTtsSettings;

            textBoxAppId.Text     = settings.AppId;
            textBoxApiKey.Text    = settings.ApiKey;
            textBoxApiSecret.Text = settings.ApiSecret;
            trackBarSpeed.SetValue(settings.Speed, 5);
            trackBarPitch.SetValue(settings.Pitch, 5);
            trackBarVolume.SetValue(settings.Volume, 5);
            var selectedVoice = (comboBoxPerson.DataSource as Voice[]).FirstOrDefault(it => it.Value == settings.Voice);

            if (selectedVoice == null)
            {
                if (comboBoxPerson.Items.Count > 0)
                {
                    comboBoxPerson.SelectedIndex = 0;
                }
            }
            else
            {
                comboBoxPerson.SelectedValue = selectedVoice.Value;
            }

            textBoxAppId.TextChanged            += OnValueChanged;
            textBoxApiKey.TextChanged           += OnValueChanged;
            textBoxApiSecret.TextChanged        += OnValueChanged;
            trackBarSpeed.ValueChanged          += OnValueChanged;
            trackBarPitch.ValueChanged          += OnValueChanged;
            trackBarVolume.ValueChanged         += OnValueChanged;
            comboBoxPerson.SelectedIndexChanged += OnValueChanged;

            OnValueChanged(null, EventArgs.Empty);

            checkBoxApiKey_CheckedChanged(null, EventArgs.Empty);

            if (string.IsNullOrWhiteSpace(settings.AppId) || string.IsNullOrWhiteSpace(settings.ApiKey) || string.IsNullOrWhiteSpace(settings.ApiSecret))
            {
                NotifyEmptyApiKey();
            }
        }
예제 #12
0
        public void PostAttachToAct(FoxTTSPlugin plugin)
        {
            var settings = plugin.Settings.YoudaoTtsSettings;

            textBoxAppId.Text     = settings.AppId;
            textBoxAppSecret.Text = settings.AppSecret;
            trackBarSpeed.SetValue(settings.Speed, 10);
            trackBarVolume.SetValue(settings.Volume, 10);

            textBoxAppId.TextChanged     += OnValueChanged;
            textBoxAppSecret.TextChanged += OnValueChanged;
            trackBarSpeed.ValueChanged   += OnValueChanged;
            trackBarVolume.ValueChanged  += OnValueChanged;

            OnValueChanged(null, EventArgs.Empty);

            checkBoxAppKey_CheckedChanged(null, EventArgs.Empty);

            if (string.IsNullOrWhiteSpace(settings.AppId) || string.IsNullOrWhiteSpace(settings.AppSecret))
            {
                NotifyEmptyApiKey();
            }
        }
예제 #13
0
 public void AttachToAct(FoxTTSPlugin plugin)
 {
     _plugin = plugin;
     _settingsControl.AttachToAct(plugin);
 }
예제 #14
0
 public DemoParser(FoxTTSPlugin plugin)
 {
     this._plugin = plugin;
 }
예제 #15
0
 public void AttachToAct(FoxTTSPlugin plugin)
 {
     _plugin = plugin;
 }
예제 #16
0
        public void PostAttachToAct(FoxTTSPlugin plugin)
        {
            _settingsControl.PostAttachToAct(plugin);

            _settingsControl.DoLocalization();
        }
예제 #17
0
 public void PostAttachToAct(FoxTTSPlugin plugin)
 {
 }