Skip to content

Commit b6802f9

Browse files
committed
Updating default parameters to match C++ example binary
Updating the default parameters to match the C++ binary's parameters. This includes: - updating the strategy to SAMPLING_BEAM_SEARCH - greedy.best_of (previously -1) - thold_pt (previously .01) - thold_ptsum (previously .01)
1 parent 19526bd commit b6802f9

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

bindings/go/whisper.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,13 @@ func Whisper_print_system_info() string {
298298
// Return default parameters for a strategy
299299
func (ctx *Context) Whisper_full_default_params(strategy SamplingStrategy) Params {
300300
// Get default parameters
301-
return Params(C.whisper_full_default_params_cb((*C.struct_whisper_context)(ctx), C.enum_whisper_sampling_strategy(strategy)))
301+
p := Params(C.whisper_full_default_params_cb((*C.struct_whisper_context)(ctx), C.enum_whisper_sampling_strategy(strategy)))
302+
303+
p.greedy.best_of = 5
304+
p.thold_pt = 0
305+
p.thold_ptsum = 0
306+
307+
return p
302308
}
303309

304310
// Run the entire model: PCM -> log mel spectrogram -> encoder -> decoder -> text

0 commit comments

Comments
 (0)