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