import type { ClientVoiceInputConfig, OpenGeniClient, TranscriptionAdapter, WorkspaceTranscriptionPolicy } from "@opengeni/sdk"; import { type VoiceInputRecordingsClient } from "../hooks/use-voice-input.js"; import type { RecorderPlatform } from "@opengeni/sdk/recordings"; import type { VoiceRecordingStore } from "../voice-recording-store.js"; export type ComposerTranscriptionMessages = { start: string; stop: string; cancel: string; retry: string; /** Transcribe a recording that was stopped without transcribing or recovered. */ transcribeSaved: string; /** Shown near the automatic stop; `{seconds}` is replaced. */ timeRemaining: string; pauseRetrying: string; requestingPermission: string; recording: string; saving: string; transcribing: string; retrying: string; recovered: string; recoveredTranscript: string; insertRecoveredTranscript: string; discardRecovered: string; unavailableDisabled: string; unavailable: string; errorPermissionDenied: string; errorNotSupported: string; errorUnavailable: string; errorInsufficientCredits: string; errorAllowanceExhausted: string; errorPolicyBlocked: string; /** The workspace is EU-only and voice input has no EU route here. */ errorRegionRestricted: string; errorTooLarge: string; errorInvalidAudio: string; errorStorageUnavailable: string; errorRetryable: string; errorHandoffUncertain: string; errorUnknown: string; }; export type ComposerTranscriptionControlProps = { /** The SDK client. With `requestJson`, dictations are kept as recordings until heard. */ client?: (Pick & Partial>) | null | undefined; /** A recordings client, such as a host proxy. Built from `client` otherwise. */ recordings?: Partial | undefined; /** How this device records; the browser's by default. */ platform?: RecorderPlatform | undefined; workspaceId?: string | undefined; capability?: ClientVoiceInputConfig | null | undefined; workspaceEnabled?: boolean | undefined; /** The language spoken ("nb", "en"); omitted or null detects it. */ language?: string | null | undefined; /** * Asked before each new dictation takes the microphone, such as a host's * consent prompt. Resolving false keeps the microphone off. */ beforeStart?: (() => boolean | Promise) | undefined; /** @deprecated Native MediaRecorder input no longer uses host adapters. */ adapter?: TranscriptionAdapter | null | undefined; /** @deprecated Native MediaRecorder input no longer uses host policies. */ policy?: WorkspaceTranscriptionPolicy | undefined; /** @deprecated Native input uses the server capability duration limit. */ lifecycleTimeouts?: unknown; /** @deprecated Native input does not expose provider diagnostics. */ onDiagnostic?: unknown; messages?: Partial | undefined; className?: string | undefined; /** @deprecated Dictations are kept by the shared recording store; ignored. */ createRecordingStore?: (() => VoiceRecordingStore) | undefined; /** @deprecated Recordings are claimed with Web Locks; ignored. */ createOwnerId?: (() => string) | undefined; /** Hide while realtime voice owns the mic — collapses with a layout-friendly exit. */ suppressed?: boolean | undefined; }; /** What a host can set on the stock composer microphone. */ export type ComposerVoiceInputOptions = Pick; /** One provider-neutral microphone control for the nearest editable composer. */ export declare function ComposerTranscriptionControl({ client, workspaceId, capability, workspaceEnabled, language, beforeStart, messages: overrides, className, recordings, platform, suppressed, }: ComposerTranscriptionControlProps): import("react").JSX.Element;