diff --git a/src/ui/Forms/Tts/TextToSpeech.Designer.cs b/src/ui/Forms/Tts/TextToSpeech.Designer.cs index 48414db64..3ff3d44bb 100644 --- a/src/ui/Forms/Tts/TextToSpeech.Designer.cs +++ b/src/ui/Forms/Tts/TextToSpeech.Designer.cs @@ -155,6 +155,7 @@ this.TextBoxTest.Size = new System.Drawing.Size(351, 20); this.TextBoxTest.TabIndex = 20; this.TextBoxTest.Text = "Hello, how are you?"; + this.TextBoxTest.KeyDown += new System.Windows.Forms.KeyEventHandler(this.TextBoxTest_KeyDown); // // buttonTestVoice // diff --git a/src/ui/Forms/Tts/TextToSpeech.cs b/src/ui/Forms/Tts/TextToSpeech.cs index c7910dcbc..1b8d5cfb6 100644 --- a/src/ui/Forms/Tts/TextToSpeech.cs +++ b/src/ui/Forms/Tts/TextToSpeech.cs @@ -570,7 +570,7 @@ namespace Nikse.SubtitleEdit.Forms.Tts var modelFileName = Path.Combine(piperPath, voice.ModelShort); if (!File.Exists(modelFileName)) { - using (var form = new PiperDownload("Piper TextToSpeech Voice") { AutoClose = true, ModelUrl = voice.Model, ModelFileName = modelFileName, PiperPath = piperPath }) + using (var form = new PiperDownload("Piper TextToSpeech voice: " + voice.Voice) { AutoClose = true, ModelUrl = voice.Model, ModelFileName = modelFileName, PiperPath = piperPath }) { if (form.ShowDialog(this) != DialogResult.OK) { @@ -582,7 +582,7 @@ namespace Nikse.SubtitleEdit.Forms.Tts var configFileName = Path.Combine(piperPath, voice.ConfigShort); if (!File.Exists(configFileName)) { - using (var form = new PiperDownload("Piper TextToSpeech Voice") { AutoClose = true, ModelUrl = voice.Config, ModelFileName = configFileName, PiperPath = piperPath }) + using (var form = new PiperDownload("Piper TextToSpeech voice config: " + voice.Voice) { AutoClose = true, ModelUrl = voice.Config, ModelFileName = configFileName, PiperPath = piperPath }) { if (form.ShowDialog(this) != DialogResult.OK) { @@ -1245,5 +1245,13 @@ namespace Nikse.SubtitleEdit.Forms.Tts e.SuppressKeyPress = true; } } + + private void TextBoxTest_KeyDown(object sender, KeyEventArgs e) + { + if (e.KeyCode == Keys.Enter) + { + buttonTestVoice_Click(null, null); + } + } } } \ No newline at end of file