SRT requires word times

This commit is contained in:
Nickolay Shmyrev
2021-06-10 10:37:15 +02:00
parent 75bedfe06d
commit 7ccf743bb6
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -20,6 +20,7 @@ if (process.argv.length > 2)
vosk.setLogLevel(-1);
const model = new vosk.Model(MODEL_PATH);
const rec = new vosk.Recognizer({model: model, sampleRate: SAMPLE_RATE});
rec.setWords(true);
const ffmpeg_run = spawn('ffmpeg', ['-loglevel', 'quiet', '-i', FILE_NAME,
'-ar', String(SAMPLE_RATE) , '-ac', '1',
+1
View File
@@ -18,6 +18,7 @@ if not os.path.exists("model"):
sample_rate=16000
model = Model("model")
rec = KaldiRecognizer(model, sample_rate)
rec.SetWords(True)
process = subprocess.Popen(['ffmpeg', '-loglevel', 'quiet', '-i',
sys.argv[1],