Пример #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)
 {
 }