Whistle API
    Preparing search index...

    Function createWhistle

    • Load an isolated browser worker and model, resolving only when inference is ready.

      Parameters

      • options: BrowserWhistleOptions = {}

        Self-hosted assets, pinned-byte mirrors, caching and loading callbacks.

      Returns Promise<Whistle>

      A ready engine whose model remains loaded until disposal or active cancellation.

      WhistleError for unsupported APIs, invalid options, aborted initialization, missing/incompatible assets, integrity mismatch or model/worker initialization failure.

      With no options, runtime/worker code comes from the package and model weights from the immutable official URL. Inference remains local. Self-hosting does not cache the application shell: offline websites need their own deployment/cache strategy.

      import { createWhistle } from '@tiny-stt/whistle';
      const engine = await createWhistle({ assetsUrl: '/whistle/' });
      try {
      const silence = await engine.transcribe(new Float32Array(16000));
      console.log(silence.text); // ''
      } finally {
      await engine.dispose();
      }