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

    StreamingExtractor

    pub(all) struct StreamingExtractor {
    config :
    FeatureConfig

    window : Array[Double]
    filterbank :
    FeatureMatrix

    buffer : Array[Double]
    buffer_start : Int
    fft_re : Array[Double]
    fft_im : Array[Double]
    spec_buffer : Array[Double]
    }

    StreamingExtractor::available_frames

    fn StreamingExtractor::available_frames(self : StreamingExtractor) -> Int

    Returns the number of ready full frames available for extraction.

    StreamingExtractor::buffered_samples

    fn StreamingExtractor::buffered_samples(self : StreamingExtractor) -> Int

    Number of retained samples, excluding any pending gap for hop > n_fft.

    StreamingExtractor::new

    Create a new streaming extractor with precomputed window and filterbank.

    StreamingExtractor::pop_features

    Consume ready frames once and derive Mel, Log-Mel and MFCC from shared Mel data. Calling separate pop methods consumes different batches; use this for aligned outputs.

    StreamingExtractor::pop_mel_frames

    Process and consume ready frames, returning a Mel Spectrogram matrix [n_mels][n_frames].

    StreamingExtractor::pop_mfcc_frames

    Process and consume ready frames, returning an MFCC matrix [n_mfcc][n_frames].

    StreamingExtractor::push_samples

    fn StreamingExtractor::push_samples(self : StreamingExtractor, chunk : Array[Double]) -> Unit

    Push newly arrived audio samples to the streaming buffer.

    StreamingExtractor::reset

    fn StreamingExtractor::reset(self : StreamingExtractor) -> Unit

    Clear remaining samples in buffer.

    StreamingExtractor::try_push_samples

    Validate a complete chunk before appending any samples. Empty chunks are no-ops. Use this API for untrusted input; legacy push_samples accepts unchecked PCM.

    StreamingFeatures

    Three views of the same consumed batch. dB clipping is local to this batch.

    Source Files