Whistle API
    Preparing search index...
    • Request microphone access and start one bounded completed-clip recording.

      Parameters

      • options: RecordingOptions = {}

        Duration, browser processing preferences and cancellation.

      Returns Promise<Recording>

      A recording handle after capture has started; result settles even with automatic stop.

      WhistleError with MICROPHONE_DENIED for permission/security denial, MICROPHONE_UNAVAILABLE for device/capture failure, INVALID_OPTIONS for invalid limits, UNSUPPORTED_ENVIRONMENT for missing APIs, or ABORTED for cancellation.

      Call from a user action on HTTPS or localhost. Tracks, timers and decoder resources are cleaned up on stop/error/cancel. An explicit recording limit cuts timer overshoot, but this is not a continuous transcription API. Permission dialogs themselves cannot be dismissed programmatically; late granted streams are immediately stopped.

      import { startRecording } from '@tiny-stt/whistle/microphone';
      async function recordBriefly() {
      const recording = await startRecording({ maxDurationSeconds: 5 });
      return recording.result; // Observe automatic completion and errors.
      }