mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 03:02:35 +01:00
Work on tts
This commit is contained in:
parent
be01dace58
commit
c0ed5acc33
@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Nikse.SubtitleEdit.Core.TextToSpeech
|
||||
|
@ -19032,6 +19032,12 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
|
||||
TaskDelayHelper.RunDelayed(TimeSpan.FromMilliseconds(25), () =>
|
||||
{
|
||||
if (string.IsNullOrEmpty(_videoFileName) || _videoInfo == null)
|
||||
{
|
||||
MessageBox.Show(LanguageSettings.Current.General.NoVideoLoaded);
|
||||
return;
|
||||
}
|
||||
|
||||
if (RequireFfmpegOk())
|
||||
{
|
||||
using (var form = new TextToSpeech(_subtitle, GetCurrentSubtitleFormat(), _videoFileName, _videoInfo))
|
||||
|
@ -182,7 +182,7 @@ namespace Nikse.SubtitleEdit.Forms.Tts
|
||||
var next = _subtitle.GetParagraphOrDefault(index + 1);
|
||||
var pFileName = Path.Combine(_waveFolder, index + ".wav");
|
||||
|
||||
//TODO: analyse audio and remove silence at start and end (ffmpeg -af silenceremove=1:0:-50dB:1:1:-50dB)
|
||||
//TODO: analyse audio and remove silence at start and end (ffmpeg -af silenceremove=1:0:-5dB:1:1:-5dB)
|
||||
var outputFileName1 = Path.Combine(_waveFolder, index + "_u.wav");
|
||||
var trimProcess = VideoPreviewGenerator.TrimSilenceStartAndEnd(pFileName, outputFileName1);
|
||||
trimProcess.Start();
|
||||
|
@ -612,7 +612,7 @@ namespace Nikse.SubtitleEdit.Logic
|
||||
StartInfo =
|
||||
{
|
||||
FileName = GetFfmpegLocation(),
|
||||
Arguments = $"-i \"{inputFileName}\" -af silenceremove=start_periods=1:start_silence=0.01,areverse,silenceremove=start_periods=1:start_silence=0.01,areverse \"{outputFileName}\"",
|
||||
Arguments = $"-i \"{inputFileName}\" -af \"areverse,atrim=start=0.2,silenceremove=start_periods=1:start_silence=0.1:start_threshold=0.01,areverse,atrim=start=0,silenceremove=start_periods=1:start_silence=0.1:start_threshold=0.01\" \"{outputFileName}\"",
|
||||
UseShellExecute = false,
|
||||
CreateNoWindow = true
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user