Fix for whisper executable path in frozen envs

This commit is contained in:
Raivis Dejus 2025-10-17 08:42:17 +03:00
commit 674ac6c511
2 changed files with 8 additions and 0 deletions

View file

@ -336,6 +336,10 @@ class RecordingTranscriber(QObject):
server_executable = "whisper-server.exe" if sys.platform == "win32" else "whisper-server"
server_path = os.path.join(APP_BASE_DIR, "whisper_cpp", server_executable)
# If running Mac and Windows installed version
if not os.path.exists(server_path):
server_path = os.path.join(APP_BASE_DIR, "buzz", "whisper_cpp", server_executable)
cmd = [
server_path,
"--port", "3003",

View file

@ -40,6 +40,10 @@ class WhisperCpp:
cli_executable = "whisper-cli.exe" if sys.platform == "win32" else "whisper-cli"
whisper_cli_path = os.path.join(APP_BASE_DIR, "whisper_cpp", cli_executable)
# If running Mac and Windows installed version
if not os.path.exists(whisper_cli_path):
whisper_cli_path = os.path.join(APP_BASE_DIR, "buzz", "whisper_cpp", cli_executable)
language = (
task.transcription_options.language
if task.transcription_options.language is not None