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: