pub struct CompressionConfig {
pub target: CompressionTarget,
pub quality_factor: f32,
pub adaptive_mode: bool,
pub masking_threshold: f32,
pub max_latency_ms: f32,
pub min_compression_ratio: f32,
pub perceptual_weighting: bool,
pub frame_size: usize,
pub overlap_factor: f32,
pub multi_scale: bool,
pub vad_threshold: f32,
}Expand description
Configuration for compression research
Fields§
§target: CompressionTargetCompression target optimization
quality_factor: f32Quality factor (0.0-1.0, higher = better quality)
adaptive_mode: boolEnable adaptive compression based on content
masking_threshold: f32Psychoacoustic masking threshold (0.0-1.0)
max_latency_ms: f32Maximum allowed latency in milliseconds
min_compression_ratio: f32Minimum compression ratio target
perceptual_weighting: boolEnable perceptual weighting
frame_size: usizeFrame size for analysis (samples)
overlap_factor: f32Overlap factor for analysis frames
multi_scale: boolEnable multi-scale compression
vad_threshold: f32Voice activity detection threshold
Implementations§
Source§impl CompressionConfig
impl CompressionConfig
Sourcepub fn with_target(self, target: CompressionTarget) -> Self
pub fn with_target(self, target: CompressionTarget) -> Self
Set compression target
Sourcepub fn with_quality_factor(self, quality: f32) -> Self
pub fn with_quality_factor(self, quality: f32) -> Self
Set quality factor
Sourcepub fn with_adaptive_mode(self, enable: bool) -> Self
pub fn with_adaptive_mode(self, enable: bool) -> Self
Enable or disable adaptive mode
Sourcepub fn with_max_latency(self, latency_ms: f32) -> Self
pub fn with_max_latency(self, latency_ms: f32) -> Self
Set maximum latency constraint
Trait Implementations§
Source§impl Clone for CompressionConfig
impl Clone for CompressionConfig
Source§fn clone(&self) -> CompressionConfig
fn clone(&self) -> CompressionConfig
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 CompressionConfig
impl Debug for CompressionConfig
Auto Trait Implementations§
impl Freeze for CompressionConfig
impl RefUnwindSafe for CompressionConfig
impl Send for CompressionConfig
impl Sync for CompressionConfig
impl Unpin for CompressionConfig
impl UnsafeUnpin for CompressionConfig
impl UnwindSafe for CompressionConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more