import type { ClientVoiceInputConfig, OpenGeniClient } from "@opengeni/sdk"; import { type DesktopDictation } from "@opengeni/sdk/desktop-bridge"; import type { RecorderPlatform } from "@opengeni/sdk/recordings"; import { type VoiceInputRecordingsClient } from "../../hooks/use-voice-input.js"; import { type OpenGeniText } from "../../messages/runtime.js"; export type DesktopDictationClient = Pick & Partial>; export type DesktopDictationHostProps = { /** The signed-in SDK client; dictations are recordings of this account. */ client: DesktopDictationClient | null; /** The workspace that hears dictations; null records nothing. */ workspaceId: string | null; /** The workspace's voice input. Read from the client's config when omitted. */ capability?: ClientVoiceInputConfig | null | undefined; /** The workspace allows voice input. Read from its settings when omitted. */ enabled?: boolean | undefined; /** * Asked before each dictation takes the microphone, such as a consent * check. Resolving false (or throwing) keeps the microphone off. */ beforeStart?: (() => boolean | Promise) | 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; /** The app's dictation. `getDesktopDictation()` by default. */ dictation?: DesktopDictation | null | undefined; }; /** * Mount once on a signed-in page inside a desktop app with dictation from * anywhere (`getDesktopDictation()`). It renders nothing: when the person * presses the dictation shortcut in any app, it records the microphone here * and transcribes with the workspace's voice input, and the app types the * text where their cursor is. A dictation that fails stays saved, and the * composer offers it later. A cancelled one is deleted; its speech goes to the * app's recent dictations only, to play or transcribe again there. */ export declare function DesktopDictationHost(props: DesktopDictationHostProps): null; /** A short sentence for the app's dictation window. */ export declare function dictationErrorMessage(code: string | null, t: OpenGeniText): string;