mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-21 10:42:35 +01:00
parent
b99fc65053
commit
40262121b0
@ -56,6 +56,8 @@ namespace Nikse.SubtitleEdit.Forms.Tts
|
||||
|
||||
private void buttonReGenerate_Click(object sender, EventArgs e)
|
||||
{
|
||||
_libMpv?.Stop();
|
||||
|
||||
Configuration.Settings.Tools.TextToSpeechElevenLabsStability = (double)nikseUpDownStability.Value / 100.0;
|
||||
Configuration.Settings.Tools.TextToSpeechElevenLabsSimilarity = (double)nikseUpDownSimilarity.Value / 100.0;
|
||||
|
||||
@ -86,21 +88,26 @@ namespace Nikse.SubtitleEdit.Forms.Tts
|
||||
|
||||
private void buttonCancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
_libMpv?.Stop();
|
||||
DialogResult = DialogResult.Cancel;
|
||||
}
|
||||
|
||||
private void buttonOK_Click(object sender, EventArgs e)
|
||||
{
|
||||
_libMpv?.Stop();
|
||||
DialogResult = DialogResult.OK;
|
||||
}
|
||||
|
||||
private void buttonPlay_Click(object sender, EventArgs e)
|
||||
{
|
||||
_libMpv?.Stop();
|
||||
|
||||
if (FileNameAndSpeedFactor == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
buttonPlay.Enabled = false;
|
||||
var waveFileName = FileNameAndSpeedFactor.Filename;
|
||||
|
||||
if (_libMpv != null)
|
||||
@ -133,6 +140,7 @@ namespace Nikse.SubtitleEdit.Forms.Tts
|
||||
using (var soundPlayer = new System.Media.SoundPlayer(waveFileName))
|
||||
{
|
||||
soundPlayer.PlaySync();
|
||||
buttonPlay.Enabled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -206,6 +206,7 @@ namespace Nikse.SubtitleEdit.Forms.Tts
|
||||
return;
|
||||
}
|
||||
|
||||
_libMpv?.Stop();
|
||||
buttonPlay.Enabled = false;
|
||||
_playing = true;
|
||||
_abortPlay = false;
|
||||
@ -265,6 +266,8 @@ namespace Nikse.SubtitleEdit.Forms.Tts
|
||||
return;
|
||||
}
|
||||
|
||||
buttonStop_Click(null, null);
|
||||
|
||||
var idx = listViewAudioClips.SelectedItems[0].Index;
|
||||
using (var form = new RegenerateAudioClip(_textToSpeech, _subtitle, idx, _engine))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user