From 5bd8b574086afae95c0f757e562b79a70d08bee6 Mon Sep 17 00:00:00 2001 From: McCloudS <64094529+McCloudS@users.noreply.github.com> Date: Sat, 4 Nov 2023 12:01:54 -0600 Subject: [PATCH] Update subgen.py --- subgen/subgen.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/subgen/subgen.py b/subgen/subgen.py index 104c250..3e4bdec 100644 --- a/subgen/subgen.py +++ b/subgen/subgen.py @@ -72,6 +72,7 @@ path_mapping_to = os.getenv('PATH_MAPPING_TO', '/Volumes/TV') model_location = os.getenv('MODEL_PATH', '.') transcribe_folders = os.getenv('TRANSCRIBE_FOLDERS', '') transcribe_or_translate = os.getenv('TRANSCRIBE_OR_TRANSLATE', 'translate') +compute_type = os.getenv('COMPUTE_TYPE', 'auto') if transcribe_device == "gpu": transcribe_device = "cuda" @@ -228,7 +229,7 @@ def start_model(): global model if model is None: logging.debug("Model was purged, need to re-create") - model = stable_whisper.load_faster_whisper(whisper_model, download_root=model_location, device=transcribe_device, cpu_threads=whisper_threads, num_workers=concurrent_transcriptions) + model = stable_whisper.load_faster_whisper(whisper_model, download_root=model_location, device=transcribe_device, cpu_threads=whisper_threads, num_workers=concurrent_transcriptions, compute_type=compute_type) def delete_model(): if len(files_to_transcribe) == 0: