From ad9146aa914d2afe17d83ccb00c37212d55ac404 Mon Sep 17 00:00:00 2001 From: 0/0 Date: Wed, 8 Feb 2023 14:44:36 -0700 Subject: [PATCH] add SamplingStrategy default --- src/whisper_params.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/whisper_params.rs b/src/whisper_params.rs index c9beee7..c9a7f99 100644 --- a/src/whisper_params.rs +++ b/src/whisper_params.rs @@ -14,6 +14,12 @@ pub enum SamplingStrategy { }, } +impl Default for SamplingStrategy { + fn default() -> Self { + Self::Greedy { best_of: 1 } + } +} + pub struct FullParams<'a, 'b> { pub(crate) fp: whisper_rs_sys::whisper_full_params, phantom_lang: PhantomData<&'a str>,