Skip to content

Commit a31b94e

Browse files
committed
https://github.com/ggerganov/whisper.cpp/issues/1507
1 parent 08854e7 commit a31b94e

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

examples/api_server.rs

+8-5
Original file line numberDiff line numberDiff line change
@@ -242,11 +242,14 @@ impl AsrContext {
242242
// Run the model.
243243
// Create a state
244244
let mut state = self.ctx.create_state().context(CreateStateSnafu)?;
245-
let mut params = FullParams::new(SamplingStrategy::Greedy { best_of: 2 });
246-
// let mut params = FullParams::new(SamplingStrategy::BeamSearch {
247-
// beam_size: 5,
248-
// patience: 1.0,
249-
// });
245+
// let mut params = FullParams::new(SamplingStrategy::Greedy { best_of: 2 });
246+
// https://github.com/ggerganov/whisper.cpp/issues/1507
247+
let mut params = FullParams::new(SamplingStrategy::BeamSearch {
248+
beam_size: 5,
249+
patience: 1.0,
250+
});
251+
params.set_entropy_thold(2.8);
252+
params.set_n_max_text_ctx(64);
250253

251254
params.set_suppress_non_speech_tokens(true);
252255
let lang = AsrLang::from_string(lang);

0 commit comments

Comments
 (0)