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", "WhisperCliPath": "/usr/bin/whisper.cpp/build/bin/whisper-cli",
"WhisperModelPath": "/usr/bin/whisper.cpp/models/ggml-base.en.bin", "WhisperModelPath": "/usr/bin/whisper.cpp/models/ggml-base.en.bin",
"WhisperLanguage": "en", "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? WhisperModelPath { get; set; }
public string WhisperLanguage { get; set; } = "en"; public string WhisperLanguage { get; set; } = "en";
public string? TempDirectory { get; set; } public string? TempDirectory { get; set; }
public bool CleanupTempFiles { get; set; }
} }

View File

@@ -74,11 +74,14 @@ public sealed class LocalWhisperCppBufferedAudioSttStrategy(
}; };
} }
finally finally
{
if (options.CleanupTempFiles)
{ {
TryDelete(oggPath); TryDelete(oggPath);
TryDelete(wavPath); TryDelete(wavPath);
} }
} }
}
private static IReadOnlyList<byte[]> ReadBufferedAudioFrames(TurnContext turn) private static IReadOnlyList<byte[]> ReadBufferedAudioFrames(TurnContext turn)
{ {