From c1843b89f96ee4f69b809edde0b8131a3cd4a596 Mon Sep 17 00:00:00 2001 From: Nico Athanassiadis Date: Tue, 14 Jan 2025 13:58:04 +0100 Subject: [PATCH] Fixed the whisper.working-directory property to include the env folder as well. --- src/main/java/se/su/dsv/seshat/services/Transcriber.java | 4 ++-- src/main/resources/application.properties | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/se/su/dsv/seshat/services/Transcriber.java b/src/main/java/se/su/dsv/seshat/services/Transcriber.java index 76176fe..3d1fc5f 100644 --- a/src/main/java/se/su/dsv/seshat/services/Transcriber.java +++ b/src/main/java/se/su/dsv/seshat/services/Transcriber.java @@ -26,7 +26,7 @@ public class Transcriber { } private void setStartVirtualEnv() { - startVirtualEnv.directory(new File(workingDirectory + "/env/bin/")); + startVirtualEnv.directory(new File(workingDirectory + "/bin/")); startVirtualEnv.inheritIO(); try { Process p = startVirtualEnv.start(); @@ -38,7 +38,7 @@ public class Transcriber { public boolean transcribe(String inputFilePath, String outputDirectory, String language) { setStartVirtualEnv(); - StringBuilder whisperCommandOptions = new StringBuilder("env/bin/whisper ") + StringBuilder whisperCommandOptions = new StringBuilder("bin/whisper ") .append(inputFilePath) .append(" --model_dir ") .append(modelPath) diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 6f256bb..cbd5513 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -12,7 +12,7 @@ app.onSuccess-homepage=/files/manage whisper.activate-virtual-env-command=bash, -c, source activate whisper.model-path=@project.basedir@/whisper-models whisper.selected-model=medium -whisper.working-directory=${user.home}/git/python-whisper +whisper.working-directory=${user.home}/git/python-whisper/env whisper.selected-device=cpu # Database properties (local development) -- 2.39.5