From 5649611ce299c9a3718b237623fd2958726d0f50 Mon Sep 17 00:00:00 2001 From: Markus Schmidt Date: Fri, 8 Oct 2021 15:39:51 +0200 Subject: [PATCH] Changed: paths --- controllers/default.py | 6 ++++-- modules/transcription_tools/__init__.py | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/controllers/default.py b/controllers/default.py index b3ee1d1..8436a4c 100644 --- a/controllers/default.py +++ b/controllers/default.py @@ -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()) \ No newline at end of file diff --git a/modules/transcription_tools/__init__.py b/modules/transcription_tools/__init__.py index f421c84..ccca102 100644 --- a/modules/transcription_tools/__init__.py +++ b/modules/transcription_tools/__init__.py @@ -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)