From 2fa33c0902c9a119aab2a13ee84b1686c2df46cc Mon Sep 17 00:00:00 2001 From: j Date: Fri, 24 Jan 2025 10:18:25 +0530 Subject: [PATCH] use large-v3-turbo --- README.md | 3 ++- run_whisper.py | 2 +- transcribe.py | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index bfd2102..2c7eb6a 100644 --- a/README.md +++ b/README.md @@ -11,12 +11,13 @@ add "transcribe" to LOCAL_APPS in local_setttings.py ## install whisper_timestamped + apt install portaudio19-dev python3 -m venv venv /opt/whisper-timestamped/ /opt/whisper-timestamped/bin/pip install \ torch==1.13.1+cpu \ torchaudio==0.13.1+cpu \ -f https://download.pytorch.org/whl/torch_stable.html - /opt/whisper-timestamped/bin/pip install whisper-timestamped + /opt/whisper-timestamped/bin/pip install whisper-timestamped transformers auditok ## configuration diff --git a/run_whisper.py b/run_whisper.py index e9b3edb..e56b988 100644 --- a/run_whisper.py +++ b/run_whisper.py @@ -7,7 +7,7 @@ import whisper_timestamped as whisper def transcribe(path, language=None, translate=None): - model = whisper.load_model("turbo") + model = whisper.load_model("large-v3-turbo") audio = whisper.load_audio(path) if translate: task = "translate" diff --git a/transcribe.py b/transcribe.py index ca569d1..3d7873d 100644 --- a/transcribe.py +++ b/transcribe.py @@ -118,7 +118,7 @@ def extract_subtitles(item, user, layer, translate, gpu=False, join_sentences=Fa cmd += [src, output] try: - subprocess.check_output(cmd) + subprocess.check_call(cmd) except: logger.error( "failed to extract subtitles from item %s\n%s", item.public_id, cmd