From 9f23739f9053f48580022da6dbf20a42558c1553 Mon Sep 17 00:00:00 2001 From: Tobi John <66161461+mlopsengr@users.noreply.github.com> Date: Fri, 15 Dec 2023 13:46:32 +0000 Subject: [PATCH] Update README.md Demonstrates use of argument to save model to local path. --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index be5a120..d43fdd1 100644 --- a/README.md +++ b/README.md @@ -165,6 +165,10 @@ compute_type = "float16" # change to "int8" if low on GPU mem (may reduce accura # 1. Transcribe with original whisper (batched) model = whisperx.load_model("large-v2", device, compute_type=compute_type) +# save model to local path (optional) +# model_dir = "/path/" +# model = whisperx.load_model("large-v2", device, compute_type=compute_type, download_root=model_dir) + audio = whisperx.load_audio(audio_file) result = model.transcribe(audio, batch_size=batch_size) print(result["segments"]) # before alignment