// This file was generated by [tauri-specta](https://github.com/oscartbeaumont/tauri-specta). Do not edit this file manually. /** user-defined commands **/ export const commands = { async changeBinding(id: string, binding: string) : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("change_binding", { id, binding }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async resetBinding(id: string) : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("reset_binding", { id }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async changePttSetting(enabled: boolean) : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("change_ptt_setting", { enabled }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async changeAudioFeedbackSetting(enabled: boolean) : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("change_audio_feedback_setting", { enabled }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async changeAudioFeedbackVolumeSetting(volume: number) : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("change_audio_feedback_volume_setting", { volume }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async changeSoundThemeSetting(theme: string) : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("change_sound_theme_setting", { theme }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async changeStartHiddenSetting(enabled: boolean) : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("change_start_hidden_setting", { enabled }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async changeAutostartSetting(enabled: boolean) : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("change_autostart_setting", { enabled }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async changeTranslateToEnglishSetting(enabled: boolean) : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("change_translate_to_english_setting", { enabled }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async changeSelectedLanguageSetting(language: string) : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("change_selected_language_setting", { language }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async changeOverlayPositionSetting(position: string) : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("change_overlay_position_setting", { position }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async changeDebugModeSetting(enabled: boolean) : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("change_debug_mode_setting", { enabled }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async changeWordCorrectionThresholdSetting(threshold: number) : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("change_word_correction_threshold_setting", { threshold }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async changePasteMethodSetting(method: string) : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("change_paste_method_setting", { method }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async getAvailableTypingTools() : Promise { return await TAURI_INVOKE("get_available_typing_tools"); }, async changeTypingToolSetting(tool: string) : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("change_typing_tool_setting", { tool }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async changeExternalScriptPathSetting(path: string | null) : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("change_external_script_path_setting", { path }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async changeClipboardHandlingSetting(handling: string) : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("change_clipboard_handling_setting", { handling }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async changeAutoSubmitSetting(enabled: boolean) : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("change_auto_submit_setting", { enabled }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async changeAutoSubmitKeySetting(key: string) : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("change_auto_submit_key_setting", { key }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async changePostProcessEnabledSetting(enabled: boolean) : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("change_post_process_enabled_setting", { enabled }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async changeExperimentalEnabledSetting(enabled: boolean) : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("change_experimental_enabled_setting", { enabled }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async changePostProcessBaseUrlSetting(providerId: string, baseUrl: string) : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("change_post_process_base_url_setting", { providerId, baseUrl }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async changePostProcessApiKeySetting(providerId: string, apiKey: string) : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("change_post_process_api_key_setting", { providerId, apiKey }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async changePostProcessModelSetting(providerId: string, model: string) : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("change_post_process_model_setting", { providerId, model }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async setPostProcessProvider(providerId: string) : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("set_post_process_provider", { providerId }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async fetchPostProcessModels(providerId: string) : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("fetch_post_process_models", { providerId }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async addPostProcessPrompt(name: string, prompt: string) : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("add_post_process_prompt", { name, prompt }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async updatePostProcessPrompt(id: string, name: string, prompt: string) : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("update_post_process_prompt", { id, name, prompt }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async deletePostProcessPrompt(id: string) : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("delete_post_process_prompt", { id }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async setPostProcessSelectedPrompt(id: string) : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("set_post_process_selected_prompt", { id }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async updateCustomWords(words: string[]) : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("update_custom_words", { words }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, /** * Temporarily unregister a binding while the user is editing it in the UI. * This avoids firing the action while keys are being recorded. */ async suspendBinding(id: string) : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("suspend_binding", { id }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, /** * Re-register the binding after the user has finished editing. */ async resumeBinding(id: string) : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("resume_binding", { id }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async changeMuteWhileRecordingSetting(enabled: boolean) : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("change_mute_while_recording_setting", { enabled }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async changeAppendTrailingSpaceSetting(enabled: boolean) : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("change_append_trailing_space_setting", { enabled }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async changeAppLanguageSetting(language: string) : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("change_app_language_setting", { language }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async changeUpdateChecksSetting(enabled: boolean) : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("change_update_checks_setting", { enabled }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, /** * Change the keyboard implementation with runtime switching. * This will unregister all shortcuts from the old implementation, * validate shortcuts for the new implementation (resetting invalid ones to defaults), * and register them with the new implementation. */ async changeKeyboardImplementationSetting(implementation: string) : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("change_keyboard_implementation_setting", { implementation }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, /** * Get the current keyboard implementation */ async getKeyboardImplementation() : Promise { return await TAURI_INVOKE("get_keyboard_implementation"); }, async changeShowTrayIconSetting(enabled: boolean) : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("change_show_tray_icon_setting", { enabled }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async changeWhisperAcceleratorSetting(accelerator: WhisperAcceleratorSetting) : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("change_whisper_accelerator_setting", { accelerator }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async changeOrtAcceleratorSetting(accelerator: OrtAcceleratorSetting) : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("change_ort_accelerator_setting", { accelerator }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, /** * Return which ORT accelerators are compiled into this build. */ async getAvailableAccelerators() : Promise { return await TAURI_INVOKE("get_available_accelerators"); }, /** * Start key recording mode */ async startHandyKeysRecording(bindingId: string) : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("start_handy_keys_recording", { bindingId }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, /** * Stop key recording mode */ async stopHandyKeysRecording() : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("stop_handy_keys_recording") }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async triggerUpdateCheck() : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("trigger_update_check") }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async showMainWindowCommand() : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("show_main_window_command") }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async cancelOperation() : Promise { await TAURI_INVOKE("cancel_operation"); }, async getAppDirPath() : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("get_app_dir_path") }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async getAppSettings() : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("get_app_settings") }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async getDefaultSettings() : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("get_default_settings") }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async getLogDirPath() : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("get_log_dir_path") }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async setLogLevel(level: LogLevel) : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("set_log_level", { level }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async openRecordingsFolder() : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("open_recordings_folder") }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async openLogDir() : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("open_log_dir") }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async openAppDataDir() : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("open_app_data_dir") }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, /** * Check if Apple Intelligence is available on this device. * Called by the frontend when the user selects Apple Intelligence provider. */ async checkAppleIntelligenceAvailable() : Promise { return await TAURI_INVOKE("check_apple_intelligence_available"); }, /** * Try to initialize Enigo (keyboard/mouse simulation). * On macOS, this will return an error if accessibility permissions are not granted. */ async initializeEnigo() : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("initialize_enigo") }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, /** * Initialize keyboard shortcuts. * On macOS, this should be called after accessibility permissions are granted. * This is idempotent - calling it multiple times is safe. */ async initializeShortcuts() : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("initialize_shortcuts") }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async getAvailableModels() : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("get_available_models") }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async getModelInfo(modelId: string) : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("get_model_info", { modelId }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async downloadModel(modelId: string) : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("download_model", { modelId }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async deleteModel(modelId: string) : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("delete_model", { modelId }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async cancelDownload(modelId: string) : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("cancel_download", { modelId }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async setActiveModel(modelId: string) : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("set_active_model", { modelId }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async getCurrentModel() : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("get_current_model") }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async getTranscriptionModelStatus() : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("get_transcription_model_status") }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async isModelLoading() : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("is_model_loading") }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async hasAnyModelsAvailable() : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("has_any_models_available") }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async hasAnyModelsOrDownloads() : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("has_any_models_or_downloads") }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async updateMicrophoneMode(alwaysOn: boolean) : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("update_microphone_mode", { alwaysOn }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async getMicrophoneMode() : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("get_microphone_mode") }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async getWindowsMicrophonePermissionStatus() : Promise { return await TAURI_INVOKE("get_windows_microphone_permission_status"); }, async openMicrophonePrivacySettings() : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("open_microphone_privacy_settings") }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async getAvailableMicrophones() : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("get_available_microphones") }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async setSelectedMicrophone(deviceName: string) : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("set_selected_microphone", { deviceName }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async getSelectedMicrophone() : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("get_selected_microphone") }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async getAvailableOutputDevices() : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("get_available_output_devices") }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async setSelectedOutputDevice(deviceName: string) : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("set_selected_output_device", { deviceName }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async getSelectedOutputDevice() : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("get_selected_output_device") }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async playTestSound(soundType: string) : Promise { await TAURI_INVOKE("play_test_sound", { soundType }); }, async checkCustomSounds() : Promise { return await TAURI_INVOKE("check_custom_sounds"); }, async setClamshellMicrophone(deviceName: string) : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("set_clamshell_microphone", { deviceName }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async getClamshellMicrophone() : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("get_clamshell_microphone") }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async isRecording() : Promise { return await TAURI_INVOKE("is_recording"); }, async setModelUnloadTimeout(timeout: ModelUnloadTimeout) : Promise { await TAURI_INVOKE("set_model_unload_timeout", { timeout }); }, async getModelLoadStatus() : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("get_model_load_status") }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async unloadModelManually() : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("unload_model_manually") }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async getHistoryEntries() : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("get_history_entries") }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async toggleHistoryEntrySaved(id: number) : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("toggle_history_entry_saved", { id }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async getAudioFilePath(fileName: string) : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("get_audio_file_path", { fileName }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async deleteHistoryEntry(id: number) : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("delete_history_entry", { id }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async updateHistoryLimit(limit: number) : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("update_history_limit", { limit }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, async updateRecordingRetentionPeriod(period: string) : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("update_recording_retention_period", { period }) }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } }, /** * Checks if the Mac is a laptop by detecting battery presence * * This uses pmset to check for battery information. * Returns true if a battery is detected (laptop), false otherwise (desktop) */ async isLaptop() : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("is_laptop") }; } catch (e) { if(e instanceof Error) throw e; else return { status: "error", error: e as any }; } } } /** user-defined events **/ /** user-defined constants **/ /** user-defined types **/ export type AppSettings = { bindings: Partial<{ [key in string]: ShortcutBinding }>; push_to_talk: boolean; audio_feedback: boolean; audio_feedback_volume?: number; sound_theme?: SoundTheme; start_hidden?: boolean; autostart_enabled?: boolean; update_checks_enabled?: boolean; selected_model?: string; always_on_microphone?: boolean; selected_microphone?: string | null; clamshell_microphone?: string | null; selected_output_device?: string | null; translate_to_english?: boolean; selected_language?: string; overlay_position?: OverlayPosition; debug_mode?: boolean; log_level?: LogLevel; custom_words?: string[]; model_unload_timeout?: ModelUnloadTimeout; word_correction_threshold?: number; history_limit?: number; recording_retention_period?: RecordingRetentionPeriod; paste_method?: PasteMethod; clipboard_handling?: ClipboardHandling; auto_submit?: boolean; auto_submit_key?: AutoSubmitKey; post_process_enabled?: boolean; post_process_provider_id?: string; post_process_providers?: PostProcessProvider[]; post_process_api_keys?: Partial<{ [key in string]: string }>; post_process_models?: Partial<{ [key in string]: string }>; post_process_prompts?: LLMPrompt[]; post_process_selected_prompt_id?: string | null; mute_while_recording?: boolean; append_trailing_space?: boolean; app_language?: string; experimental_enabled?: boolean; keyboard_implementation?: KeyboardImplementation; show_tray_icon?: boolean; paste_delay_ms?: number; typing_tool?: TypingTool; external_script_path: string | null; custom_filler_words?: string[] | null; whisper_accelerator?: WhisperAcceleratorSetting; ort_accelerator?: OrtAcceleratorSetting } export type AudioDevice = { index: string; name: string; is_default: boolean } export type AutoSubmitKey = "enter" | "ctrl_enter" | "cmd_enter" export type AvailableAccelerators = { whisper: string[]; ort: string[] } export type BindingResponse = { success: boolean; binding: ShortcutBinding | null; error: string | null } export type ClipboardHandling = "dont_modify" | "copy_to_clipboard" export type CustomSounds = { start: boolean; stop: boolean } export type EngineType = "Whisper" | "Parakeet" | "Moonshine" | "MoonshineStreaming" | "SenseVoice" | "GigaAM" | "Canary" export type HistoryEntry = { id: number; file_name: string; timestamp: number; saved: boolean; title: string; transcription_text: string; post_processed_text: string | null; post_process_prompt: string | null } /** * Result of changing keyboard implementation */ export type ImplementationChangeResult = { success: boolean; /** * List of binding IDs that were reset to defaults due to incompatibility */ reset_bindings: string[] } export type KeyboardImplementation = "tauri" | "handy_keys" export type LLMPrompt = { id: string; name: string; prompt: string } export type LogLevel = "trace" | "debug" | "info" | "warn" | "error" export type ModelInfo = { id: string; name: string; description: string; filename: string; url: string | null; size_mb: number; is_downloaded: boolean; is_downloading: boolean; partial_size: number; is_directory: boolean; engine_type: EngineType; accuracy_score: number; speed_score: number; supports_translation: boolean; is_recommended: boolean; supported_languages: string[]; supports_language_selection: boolean; is_custom: boolean } export type ModelLoadStatus = { is_loaded: boolean; current_model: string | null } export type ModelUnloadTimeout = "never" | "immediately" | "min_2" | "min_5" | "min_10" | "min_15" | "hour_1" | "sec_5" export type OrtAcceleratorSetting = "auto" | "cpu" | "cuda" | "directml" | "rocm" export type OverlayPosition = "none" | "top" | "bottom" export type PasteMethod = "ctrl_v" | "direct" | "none" | "shift_insert" | "ctrl_shift_v" | "external_script" export type PermissionAccess = "allowed" | "denied" | "unknown" export type PostProcessProvider = { id: string; label: string; base_url: string; allow_base_url_edit?: boolean; models_endpoint?: string | null; supports_structured_output?: boolean } export type RecordingRetentionPeriod = "never" | "preserve_limit" | "days_3" | "weeks_2" | "months_3" export type ShortcutBinding = { id: string; name: string; description: string; default_binding: string; current_binding: string } export type SoundTheme = "marimba" | "pop" | "custom" export type TypingTool = "auto" | "wtype" | "kwtype" | "dotool" | "ydotool" | "xdotool" export type WhisperAcceleratorSetting = "auto" | "cpu" | "gpu" export type WindowsMicrophonePermissionStatus = { supported: boolean; overall_access: PermissionAccess; device_access: PermissionAccess; app_access: PermissionAccess; desktop_app_access: PermissionAccess } /** tauri-specta globals **/ import { invoke as TAURI_INVOKE, Channel as TAURI_CHANNEL, } from "@tauri-apps/api/core"; import * as TAURI_API_EVENT from "@tauri-apps/api/event"; import { type WebviewWindow as __WebviewWindow__ } from "@tauri-apps/api/webviewWindow"; type __EventObj__ = { listen: ( cb: TAURI_API_EVENT.EventCallback, ) => ReturnType>; once: ( cb: TAURI_API_EVENT.EventCallback, ) => ReturnType>; emit: null extends T ? (payload?: T) => ReturnType : (payload: T) => ReturnType; }; export type Result = | { status: "ok"; data: T } | { status: "error"; error: E }; function __makeEvents__>( mappings: Record, ) { return new Proxy( {} as unknown as { [K in keyof T]: __EventObj__ & { (handle: __WebviewWindow__): __EventObj__; }; }, { get: (_, event) => { const name = mappings[event as keyof T]; return new Proxy((() => {}) as any, { apply: (_, __, [window]: [__WebviewWindow__]) => ({ listen: (arg: any) => window.listen(name, arg), once: (arg: any) => window.once(name, arg), emit: (arg: any) => window.emit(name, arg), }), get: (_, command: keyof __EventObj__) => { switch (command) { case "listen": return (arg: any) => TAURI_API_EVENT.listen(name, arg); case "once": return (arg: any) => TAURI_API_EVENT.once(name, arg); case "emit": return (arg: any) => TAURI_API_EVENT.emit(name, arg); } }, }); }, }, ); }