Representation the signal strength over time at various frequencies present in a particular waveform. Created by applying Fast Fourier Transform (FFT) on the overlapping segments of the audio data.

var spectrogram = spectrogramBuilder
.setFrameSize(frameSize)
.setHopSize(hopSize)
.setFFTSize(fftSize)
.build();
interface Spectrogram {
    maxTensorSize: number;
    getTypeName(): string;
    isOfType(type: string): boolean;
    isSame(other: ScriptObject): boolean;
    process(inTensor: Float32Array, inShape: vec3, outTensor: Float32Array): vec3;
}

Hierarchy (view full)

Properties

maxTensorSize: number

Returns the maximum buffer length.

Methods

  • Returns true if the object matches or derives from the passed in type.

    Parameters

    • type: string

    Returns boolean

  • Returns true if this object is the same as other. Useful for checking if two references point to the same thing.

    Parameters

    Returns boolean

  • Processes audio data from the inTensor of inShape, writes result to the outTensor and returns the outTensor shape.

    Parameters

    • inTensor: Float32Array
    • inShape: vec3
    • outTensor: Float32Array

    Returns vec3