#[non_exhaustive]pub struct SegmentConfig { /* private fields */ }Expand description
How frame values become silence and sound spans.
Implementations§
Source§impl SegmentConfig
impl SegmentConfig
Sourcepub fn threshold(self, threshold: Threshold) -> Result<Self, ConfigError>
pub fn threshold(self, threshold: Threshold) -> Result<Self, ConfigError>
Sets the threshold.
§Errors
ConfigError::InvalidThreshold if the value is not finite or a
Threshold::BelowRef distance is negative.
Sourcepub fn min_silence(self, d: Duration) -> Self
pub fn min_silence(self, d: Duration) -> Self
Silence shorter than this counts as sound, so stop closures inside words stay whole. This also applies to silence at either end of the audio, including digital zero.
Trait Implementations§
Source§impl Clone for SegmentConfig
impl Clone for SegmentConfig
Source§impl Debug for SegmentConfig
impl Debug for SegmentConfig
Source§impl Default for SegmentConfig
impl Default for SegmentConfig
Source§impl PartialEq for SegmentConfig
impl PartialEq for SegmentConfig
impl StructuralPartialEq for SegmentConfig
Auto Trait Implementations§
impl Freeze for SegmentConfig
impl RefUnwindSafe for SegmentConfig
impl Send for SegmentConfig
impl Sync for SegmentConfig
impl Unpin for SegmentConfig
impl UnsafeUnpin for SegmentConfig
impl UnwindSafe for SegmentConfig
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