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§
Source§impl StftOptions
impl StftOptions
Sourcepub 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§
Source§impl Clone for StftOptions
impl Clone for StftOptions
Source§fn clone(&self) -> StftOptions
fn clone(&self) -> StftOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for StftOptions
Source§impl Debug for StftOptions
impl Debug for StftOptions
Source§impl Default for StftOptions
impl Default for StftOptions
Source§fn default() -> StftOptions
fn default() -> StftOptions
Returns the “default value” for a type. Read more
Source§impl PartialEq for StftOptions
impl PartialEq 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 UnsafeUnpin 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