try and get more debug info

This commit is contained in:
Jacob Dubin
2026-04-18 00:56:28 -05:00
parent e4f8d6940d
commit 6276a8e1ac
3 changed files with 8 additions and 3 deletions

View File

@@ -19,7 +19,8 @@
"WhisperCliPath": "/usr/bin/whisper.cpp/build/bin/whisper-cli",
"WhisperModelPath": "/usr/bin/whisper.cpp/models/ggml-base.en.bin",
"WhisperLanguage": "en",
"TempDirectory": "/tmp/openjibo-stt"
"TempDirectory": "/tmp/openjibo-stt",
"CleanupTempFiles": false
}
}
}

View File

@@ -8,4 +8,5 @@ public sealed class BufferedAudioSttOptions
public string? WhisperModelPath { get; set; }
public string WhisperLanguage { get; set; } = "en";
public string? TempDirectory { get; set; }
public bool CleanupTempFiles { get; set; }
}

View File

@@ -75,8 +75,11 @@ public sealed class LocalWhisperCppBufferedAudioSttStrategy(
}
finally
{
TryDelete(oggPath);
TryDelete(wavPath);
if (options.CleanupTempFiles)
{
TryDelete(oggPath);
TryDelete(wavPath);
}
}
}