Changed: paths

This commit is contained in:
Markus Schmidt 2021-10-08 15:39:51 +02:00
parent b316b60c2a
commit 5649611ce2
2 changed files with 6 additions and 4 deletions

View File

@ -18,8 +18,10 @@ def manage():
return dict(grid=grid)
def vtt():
return dict(message=transcription_tools.create_vtt(
'/home/mschmidt/Videos/100-Meinungen-Video-erstellen.mp4'))
video_path = '/home/mschmidt/Videos/100-Meinungen-Video-erstellen.mp4'
model_path = 'applications/transcription/private/model'
return dict(message=transcription_tools.create_vtt(model_path, video_path))
def user():
return dict(form=auth())

View File

@ -24,9 +24,9 @@ import json
import datetime
def create_vtt(video_path):
def create_vtt(model_path, video_path):
sample_rate = 16000
model = Model("applications/transcription/private/model")
model = Model(model_path)
rec = KaldiRecognizer(model, sample_rate)
rec.SetWords(True)