Optimize Whisper C++ parameters for better transcription quality

This commit is contained in:
Beingpax 2025-02-25 18:55:30 +05:45
parent 9d38c7c8fa
commit 34459f6621

View File

@ -76,9 +76,18 @@ actor WhisperContext {
params.translate = false
params.n_threads = Int32(maxThreads)
params.offset_ms = 0
params.no_context = true
params.no_context = false
params.single_segment = false
// Additional optimized parameters
params.suppress_blank = true
params.thold_pt = 0.01
// Only set audio_ctx if we're not in single_segment mode
if !params.single_segment {
params.audio_ctx = 1500
}
whisper_reset_timings(context)
print("About to run whisper_full")
samples.withUnsafeBufferPointer { samples in