diff --git a/controllers/default.py b/controllers/default.py index 7f8c40a..b3ee1d1 100644 --- a/controllers/default.py +++ b/controllers/default.py @@ -18,7 +18,8 @@ def manage(): return dict(grid=grid) def vtt(): - return dict(message=transcription_tools.create_vtt()) + return dict(message=transcription_tools.create_vtt( + '/home/mschmidt/Videos/100-Meinungen-Video-erstellen.mp4')) 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 cd08105..f421c84 100644 --- a/modules/transcription_tools/__init__.py +++ b/modules/transcription_tools/__init__.py @@ -24,14 +24,14 @@ import json import datetime -def create_vtt(): +def create_vtt(video_path): sample_rate = 16000 model = Model("applications/transcription/private/model") rec = KaldiRecognizer(model, sample_rate) rec.SetWords(True) process = subprocess.Popen(['ffmpeg', '-loglevel', 'quiet', '-i', - '/home/mschmidt/Videos/100-Meinungen-Video-erstellen.mp4', + video_path, '-ar', str(sample_rate) , '-ac', '1', '-f', 's16le', '-'], stdout=subprocess.PIPE)