Struct imbe::spectral::Spectrals
[−]
[src]
pub struct Spectrals(_);
Spectral amplitudes Ml, 1 ≤ l ≤ L, measure the spectral envelope of the voiced/unvoiced signal spectrum.
Methods
impl Spectrals[src]
pub fn new(
coefs: &Coefficients,
params: &BaseParams,
prev: &PrevFrame
) -> Spectrals[src]
coefs: &Coefficients,
params: &BaseParams,
prev: &PrevFrame
) -> Spectrals
Create a new Spectrals from the given DCT coefficients vector Tl and
current/previous frame parameters.
pub fn get(&self, l: usize) -> f32[src]
Retrieve the spectral amplitude Ml for the given l.
Methods from Deref<Target = ArrayVec<[f32; 56]>>
pub fn len(&self) -> usize[src]
Return the number of elements in the ArrayVec.
use arrayvec::ArrayVec; let mut array = ArrayVec::from([1, 2, 3]); array.pop(); assert_eq!(array.len(), 2);
pub fn capacity(&self) -> usize[src]
Return the capacity of the ArrayVec.
use arrayvec::ArrayVec; let array = ArrayVec::from([1, 2, 3]); assert_eq!(array.capacity(), 3);
pub fn is_full(&self) -> bool[src]
Return if the ArrayVec is completely filled.
use arrayvec::ArrayVec; let mut array = ArrayVec::<[_; 1]>::new(); assert!(!array.is_full()); array.push(1); assert!(array.is_full());
pub fn as_slice(&self) -> &[<A as Array>::Item][src]
Return a slice containing all elements of the vector.
Trait Implementations
impl Clone for Spectrals[src]
fn clone(&self) -> Spectrals[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl Deref for Spectrals[src]
type Target = ArrayVec<[f32; 56]>
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target[src]
Dereferences the value.