File tree 1 file changed +8
-5
lines changed
1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -242,11 +242,14 @@ impl AsrContext {
242
242
// Run the model.
243
243
// Create a state
244
244
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 ) ;
250
253
251
254
params. set_suppress_non_speech_tokens ( true ) ;
252
255
let lang = AsrLang :: from_string ( lang) ;
You can’t perform that action at this time.
0 commit comments