From 547c4afb57828f8c36c97b6591c277a167f6ad46 Mon Sep 17 00:00:00 2001 From: Martin Moehle Date: Wed, 27 Mar 2024 18:28:59 +0100 Subject: [PATCH] Adjusted rust installation check to work with windows --- software/source/server/services/stt/local-whisper/stt.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/software/source/server/services/stt/local-whisper/stt.py b/software/source/server/services/stt/local-whisper/stt.py index b318e8e..4ceaf10 100644 --- a/software/source/server/services/stt/local-whisper/stt.py +++ b/software/source/server/services/stt/local-whisper/stt.py @@ -42,8 +42,8 @@ def install(service_dir): # Check if whisper-rust executable exists before attempting to build if not os.path.isfile(os.path.join(WHISPER_RUST_PATH, "target/release/whisper-rust")): # Check if Rust is installed. Needed to build whisper executable - rust_check = subprocess.call('command -v rustc', shell=True) - if rust_check != 0: + rustc_path = shutil.which("rustc") + if rustc_path is None: print("Rust is not installed or is not in system PATH. Please install Rust before proceeding.") exit(1)