foo-webview-sdk
    Preparing search index...

    Interface FullWaveformResult

    audio.generateFullWaveform synchronous result shape.

    interface FullWaveformResult {
        cached?: boolean;
        cacheKey?: string;
        channels?: number;
        code?: string;
        duration?: number;
        error?: string;
        fromCache?: boolean;
        maxAmplitude?: number;
        method?: "rms" | "peak";
        path?: string;
        resolution?: number;
        sampleRate?: number;
        scale?: "linear" | "db";
        signed?: boolean;
        status?: "pending" | "ready";
        success: boolean;
        taskId?: string;
        waveform?: number[];
    }
    Index
    cached?: boolean

    True when the response was served from cache.

    cacheKey?: string

    The host never sends it.

    channels?: number

    Channel count.

    code?: string

    ApiErrorCode when success === false.

    duration?: number

    Track duration in seconds.

    error?: string

    Error message when success === false.

    fromCache?: boolean

    The host never sends it; read cached.

    maxAmplitude?: number

    The largest value of the selected sequence before normalisation, in linear full-scale units (window RMS for rms, peak for peak, absolute value for signed). On the linear scale waveform[i] * maxAmplitude restores the level; on db, dBFS is (v * 60 - 60) + 20 * log10(maxAmplitude). Hosts before 1.14 omit it.

    method?: "rms" | "peak"

    Aggregation method used for the waveform points.

    path?: string

    Source file path.

    resolution?: number

    Sample resolution.

    sampleRate?: number

    Sample rate in Hz.

    scale?: "linear" | "db"

    Scale of the waveform points.

    signed?: boolean

    True when waveform samples are signed (PCM convention).

    status?: "pending" | "ready"

    Status: ready (waveform available) or pending (background job dispatched).

    success: boolean
    taskId?: string

    Background-task identifier; only present when status === 'pending'.

    waveform?: number[]

    Waveform data; only present when status === 'ready'.