#[non_exhaustive]pub struct DenoiserConfig {
pub denoise_audio: bool,
pub snr_threshold: f32,
/* private fields */
}Expand description
Denoiser config. May not be supported for all models and may have no effect.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.denoise_audio: boolDenoise audio before sending to the transcription model.
snr_threshold: f32Signal-to-Noise Ratio (SNR) threshold for the denoiser. Here SNR means the loudness of the speech signal. Audio with an SNR below this threshold, meaning the speech is too quiet, will be prevented from being sent to the transcription model.
If snr_threshold=0, no filtering will be applied.
Implementations§
Source§impl DenoiserConfig
impl DenoiserConfig
pub fn new() -> Self
Sourcepub fn set_denoise_audio<T: Into<bool>>(self, v: T) -> Self
pub fn set_denoise_audio<T: Into<bool>>(self, v: T) -> Self
Sourcepub fn set_snr_threshold<T: Into<f32>>(self, v: T) -> Self
pub fn set_snr_threshold<T: Into<f32>>(self, v: T) -> Self
Trait Implementations§
Source§impl Clone for DenoiserConfig
impl Clone for DenoiserConfig
Source§fn clone(&self) -> DenoiserConfig
fn clone(&self) -> DenoiserConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DenoiserConfig
impl Debug for DenoiserConfig
Source§impl Default for DenoiserConfig
impl Default for DenoiserConfig
Source§fn default() -> DenoiserConfig
fn default() -> DenoiserConfig
Returns the “default value” for a type. Read more
Source§impl Message for DenoiserConfig
impl Message for DenoiserConfig
Source§impl PartialEq for DenoiserConfig
impl PartialEq for DenoiserConfig
impl StructuralPartialEq for DenoiserConfig
Auto Trait Implementations§
impl Freeze for DenoiserConfig
impl RefUnwindSafe for DenoiserConfig
impl Send for DenoiserConfig
impl Sync for DenoiserConfig
impl Unpin for DenoiserConfig
impl UnwindSafe for DenoiserConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more