try and get more debug info
This commit is contained in:
@@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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; }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user