Struct StftOptions
pub struct StftOptions {
pub n_fft: usize,
pub hop_length: usize,
pub win_length: Option<usize>,
pub center: bool,
pub onesided: bool,
}Fields§
§n_fft: usizeSize of each FFT frame (must be >= 1).
hop_length: usizeStride between successive frames (must be >= 1 and <= effective window length so overlap-add can reconstruct the signal).
win_length: Option<usize>Window length. If Some(w), the window is center-padded to n_fft. Defaults to n_fft.
center: boolIf true, the signal is reflect-padded by n_fft / 2 on both sides before framing.
onesided: boolIf true (typical for real input), output has n_fft/2 + 1 frequency bins; otherwise
the full n_fft bins are returned.
Implementations§
§impl StftOptions
impl StftOptions
pub fn new(n_fft: usize) -> StftOptions
pub fn new(n_fft: usize) -> StftOptions
Construct default options for the given FFT size, matching PyTorch defaults
(hop_length = n_fft / 4, win_length = None, center = true, onesided = true).
Trait Implementations§
§impl Clone for StftOptions
impl Clone for StftOptions
§fn clone(&self) -> StftOptions
fn clone(&self) -> StftOptions
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 more§impl Debug for StftOptions
impl Debug for StftOptions
§impl Default for StftOptions
impl Default for StftOptions
§fn default() -> StftOptions
fn default() -> StftOptions
Returns the “default value” for a type. Read more
§impl PartialEq for StftOptions
impl PartialEq for StftOptions
impl Copy for StftOptions
impl StructuralPartialEq for StftOptions
Auto Trait Implementations§
impl Freeze for StftOptions
impl RefUnwindSafe for StftOptions
impl Send for StftOptions
impl Sync for StftOptions
impl Unpin for StftOptions
impl UnwindSafe for StftOptions
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
§impl<C> CloneExpand for Cwhere
C: Clone,
impl<C> CloneExpand for Cwhere
C: Clone,
fn __expand_clone_method(&self, _scope: &mut Scope) -> C
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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