Skip to content

Commit

Permalink
Update subgen.py
Browse files Browse the repository at this point in the history
  • Loading branch information
McCloudS authored Nov 4, 2023
1 parent 1b86ef6 commit 5bd8b57
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion subgen/subgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ def convert_to_bool(in_bool):
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"

Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 5bd8b57

Please sign in to comment.