use large-v3-turbo
This commit is contained in:
parent
ecf5effc83
commit
2fa33c0902
3 changed files with 4 additions and 3 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue