Fixed the whisper.working-directory property to include the env folder as well. #5

Merged
niat8586 merged 1 commits from properties-fix into develop 2025-01-14 14:01:13 +01:00
2 changed files with 3 additions and 3 deletions

View File

@ -26,7 +26,7 @@ public class Transcriber {
} }
private void setStartVirtualEnv() { private void setStartVirtualEnv() {
startVirtualEnv.directory(new File(workingDirectory + "/env/bin/")); startVirtualEnv.directory(new File(workingDirectory + "/bin/"));
startVirtualEnv.inheritIO(); startVirtualEnv.inheritIO();
try { try {
Process p = startVirtualEnv.start(); Process p = startVirtualEnv.start();
@ -38,7 +38,7 @@ public class Transcriber {
public boolean transcribe(String inputFilePath, String outputDirectory, String language) { public boolean transcribe(String inputFilePath, String outputDirectory, String language) {
setStartVirtualEnv(); setStartVirtualEnv();
StringBuilder whisperCommandOptions = new StringBuilder("env/bin/whisper ") StringBuilder whisperCommandOptions = new StringBuilder("bin/whisper ")
.append(inputFilePath) .append(inputFilePath)
.append(" --model_dir ") .append(" --model_dir ")
.append(modelPath) .append(modelPath)

View File

@ -12,7 +12,7 @@ app.onSuccess-homepage=/files/manage
whisper.activate-virtual-env-command=bash, -c, source activate whisper.activate-virtual-env-command=bash, -c, source activate
whisper.model-path=@project.basedir@/whisper-models whisper.model-path=@project.basedir@/whisper-models
whisper.selected-model=medium 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 whisper.selected-device=cpu
# Database properties (local development) # Database properties (local development)