Whistle API
    Preparing search index...

    Function useWhistle

    • Own one browser engine with explicit loading and a FIFO of PCM/file requests.

      Parameters

      • options: UseWhistleOptions = {}

        Asset URLs and cache preference. Equivalent string/URL values keep the same instance across renders; changed values release the old engine and require load again.

      Returns UseWhistleReturn

      Reactive state and stable actions for this configuration. Observe rejected action promises, even when displaying the returned error state.

      React 19 and @tiny-stt/whistle are peer dependencies of this package. SSR produces idle state without browser API access. Unmount, configuration changes, pagehide and effect replay cancel work, discard stale completions and dispose the engine. Page restoration/effect replay permits an explicit reload. Keep the hook mounted for model reuse. Per-call signals cancel only that request; cancel aborts all pending work owned by this hook. Cancelling active inference can reload the worker before subsequent work. No global model or context provider is used.