pub struct ToneAnalysis {
pub score: f64,
pub rms: f64,
pub samples: usize,
}Expand description
Result of analysing a recording for a tone, with diagnostics to tell apart “tone present” / “audio but wrong tone” / “silence (no media)”.
Fields§
§score: f64Goertzel score at the target frequency (~1.0 = present, ~0 = absent).
rms: f64RMS amplitude of the analysed window (~0 = silence / no audio received).
samples: usizeNumber of samples analysed.
Trait Implementations§
Source§impl Clone for ToneAnalysis
impl Clone for ToneAnalysis
Source§fn clone(&self) -> ToneAnalysis
fn clone(&self) -> ToneAnalysis
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 ToneAnalysis
Source§impl Debug for ToneAnalysis
impl Debug for ToneAnalysis
Source§impl Default for ToneAnalysis
impl Default for ToneAnalysis
Source§fn default() -> ToneAnalysis
fn default() -> ToneAnalysis
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ToneAnalysis
impl RefUnwindSafe for ToneAnalysis
impl Send for ToneAnalysis
impl Sync for ToneAnalysis
impl Unpin for ToneAnalysis
impl UnsafeUnpin for ToneAnalysis
impl UnwindSafe for ToneAnalysis
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