Sign in

    1zhouhaoran1/moonmel/src/features/formant does not have a README file

    Formant

    pub(all) struct Formant {
    frequency : Double
    bandwidth : Double
    } derive(Eq,
    Debug
    )

    Formant represents an acoustic resonance of the vocal tract.

    Formant::equal

    fn Formant::equal(Formant, Formant) -> Bool

    Formant::not_equal

    fn Formant::not_equal(x : Formant, y : Formant) -> Bool

    Formant::to_repr

    FormantConfig

    pub(all) struct FormantConfig {
    lpc_order : Int
    min_frequency : Double
    max_frequency : Double
    max_bandwidth : Double
    pre_emphasis : Double
    frame_length : Int
    hop_length : Int
    } derive(
    Debug
    )

    Configuration parameters for formant extraction.

    FormantConfig::default

    fn FormantConfig::default() -> FormantConfig

    Default configuration for speech formant analysis at 16 kHz.

    FormantFrame

    pub(all) struct FormantFrame {
    formants : Array[Formant]
    } derive(
    Debug
    )

    Formant analysis result for a single audio frame.

    durand_kerner

    fn durand_kerner(coeffs : Array[Double], max_iters? : Int, tol? : Double) -> Array[
    Complex
    ]

    Durand-Kerner (Weierstrass) simultaneous root-finding algorithm for monic polynomial: P(z) = z^p + coeffs[0] * z^(p-1) + coeffs[1] * z^(p-2) + ... + coeffs[p-1] = 0.

    formant_frequencies

    fn formant_frequencies(frames : Array[FormantFrame], formant_idx : Int, fallback? : Double) -> Array[Double]

    Extract a specific formant frequency track across frames (e.g. 0 for F1, 1 for F2, 2 for F3).

    formant_track

    fn formant_track(samples : Array[Double], sample_rate : Int, config? : FormantConfig) -> Result[Array[FormantFrame],
    MelError
    ]

    Extract time-varying formant tracks across an entire audio signal.

    formants_frame

    fn formants_frame(frame : Array[Double], sample_rate : Int, config? : FormantConfig) -> Result[FormantFrame,
    MelError
    ]

    Estimate FormantFrame on a single audio window.

    formants_from_lpc

    fn formants_from_lpc(lpc_coeffs : Array[Double], sample_rate : Int, config : FormantConfig) -> FormantFrame

    Extract FormantFrame from LPC prediction coefficients.

    Source Files

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io