Edgewise API
    Preparing search index...

    Interface EdgewiseConfig

    interface EdgewiseConfig {
        allowPreview: boolean;
        cacheDir?: string;
        debug: boolean;
        experimental: { webnn?: boolean };
        fallback: Required<FallbackPolicy>;
        hub: string;
        licenses: string[];
        maxLoadedModels: number;
        memoryBudget: number | "auto" | "off";
        preferLowMemory: boolean | "auto";
        serverGpu: "auto" | "off" | "force";
        speak: {
            onSynthesize?: (
                info: { audio: Float32Array; sampleRate: number; voice: unknown },
            ) => void;
        };
        wasmPaths?: string;
    }
    Index
    allowPreview: boolean

    Allow preview and experimental models everywhere.

    cacheDir?: string

    Server only: where model files are cached. Default $EDGEWISE_CACHE or ~/.cache/edgewise.

    debug: boolean

    Log what Edgewise decides (device, dtype, fallbacks).

    experimental: { webnn?: boolean }
    fallback: Required<FallbackPolicy>
    hub: string

    Base URL model files are downloaded from. Default https://huggingface.co.

    licenses: string[]

    Only allow models whose licence is in this list. Empty means allow all.

    maxLoadedModels: number

    Maximum models kept loaded at once. Least recently used models are unloaded first.

    memoryBudget: number | "auto" | "off"

    Memory that loaded models may use together, in bytes. Before a load, least recently used models are unloaded until the new one fits. 'auto' (default) picks a budget from the device: about 2 GB on phones and low-memory devices (where a model that alone exceeds it throws OutOfMemoryError), and a soft limit elsewhere. A number is a strict budget. 'off' disables it. Sizes are estimates; see memoryUsage().

    preferLowMemory: boolean | "auto"

    With device: 'auto', choose a variant on another device when it needs at most half the memory, for example speech models on WebAssembly instead of WebGPU. 'auto' (default) turns it on for phones and devices with 4 GB of memory or less.

    serverGpu: "auto" | "off" | "force"

    Server only: use a GPU through vgpu when a hardware adapter is present.

    speak: {
        onSynthesize?: (
            info: { audio: Float32Array; sampleRate: number; voice: unknown },
        ) => void;
    }
    wasmPaths?: string

    Browser only: where ONNX Runtime loads its .wasm files from. Defaults to the jsDelivr CDN. Point it at your own copy of onnxruntime-web/dist/ to self-host.