Struct irapt::Parameters [−][src]
pub struct Parameters {
pub sample_rate: f64,
pub harmonics_estimation_interval: f64,
pub harmonics_estimation_window_duration: f64,
pub candidate_selection_window_duration: f64,
pub pitch_range: RangeInclusive<f64>,
pub candidate_generator_fft_len: usize,
pub half_interpolation_window_len: u32,
pub interpolation_factor: u8,
pub candidate_taper: f64,
pub candidate_step_decay: f64,
pub candidate_max_jump: usize,
}Expand description
Fields
sample_rate: f64The constant sample rate, in Hz, the input was sampled with.
The suggested default is 6000.0.
harmonics_estimation_interval: f64Interval, in seconds, at which harmonics of the input are estimated.
The suggested default is 0.005.
harmonics_estimation_window_duration: f64Duration, in seconds, of the sliding window upon which harmonics of the input are estimated.
The suggested default is 0.05.
candidate_selection_window_duration: f64Duration, in seconds, of the sliding window upon which pitches are estimated.
A shorter candidate selection window will be more responsive to fluctuations in input, but less accurate. The
suggested default is 0.3.
pitch_range: RangeInclusive<f64>Frequency range, in Hz, within which to detect pitch.
Wider frequency ranges require a larger candidate_generator_fft_len or sample_rate to maintain adequate
frequency resolution of pitch detection. The suggested default for any human speech is 50.0..=450.0.
candidate_generator_fft_len: usizeSize of the FFT used for candidate generation.
The candidate generation FFT size affects the frequency resolution of pitch detection. Larger FFT sizes result
in a higher resolution. The suggested default is 16384.
Certain FFT sizes, e.g. powers of two, are more computationally efficient than others. See the
rustfft crate for the supported optimizations based on FFT size.
half_interpolation_window_len: u32Half-length of the window of the interpolator used on generated pitch candidates.
A window too short for the given candidate_generator_fft_len will suffer from artifacts resulting from poor
interpolation. The suggested default is 12.
The window half-length must be less than or equal to both:
(sample_rate / pitch_range.end()).floor(), andcandidate_generator_fft_len - (sample_rate / pitch_range.start()).ceil()
interpolation_factor: u8Number of pitch candidates to interpolate in between each generated pitch candidate.
The suggested default in 2.
candidate_taper: f64Taper factor applied to candidates within a time step.
Candidates within a single time step will be weighted from 1.0 - candidate_taper..=1.0 linearly proportional
to their frequencies. The suggested default is 0.25.
candidate_step_decay: f64Decay factor applied to candidates at each time step within the given candidate_selection_window_duration.
The suggested default is 0.95.
candidate_max_jump: usizeAssumed maximum distance a valid pitch will change within the harmonics_estimation_interval.
The unit of distance is in candidates, which is an arbitrary logarithmic frequency scale.
Implementations
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Parameters
impl Send for Parameters
impl Sync for Parameters
impl Unpin for Parameters
impl UnwindSafe for Parameters
Blanket Implementations
Mutably borrows from an owned value. Read more