/** Visible text and announcements; every key falls back to English. */ export type AudioRecorderLabels = { /** Start button text. */ start: string; /** Stop button text, shown while recording. */ stop: string; /** Announced to screen readers when recording begins. */ recording: string; /** Announced when a recording finishes, followed by its duration. */ recorded: string; /** Alert text when the browser refuses microphone access. */ permissionDenied: string; /** Alert text when there is no microphone or MediaRecorder support; Start is disabled. */ unsupported: string; }; /** Props for the microphone recorder: one toggle button, a timer, and a `File` on stop. */ export interface AudioRecorderProps { /** Receives the finished recording; never called for an empty one or after unmount. */ onRecorded: (file: File) => void; /** Stops the recording by itself after this many seconds. No limit when omitted. */ maxDurationSec?: number; /** Blocks Start only; a recording already in progress can always be stopped. */ isDisabled?: boolean; /** Overrides the default English strings; unset keys keep their default. */ labels?: Partial; }