tonhowtf/omniget · warning
[omnidisc] push-to-talk status unavailable
Error message
[omnidisc] push-to-talk status unavailable
What it means
Logged by the PTT status refresher when `omnidisc_voice_ptt_status` fails. It sets pttRegistered to null, meaning 'unknown', so the UI should render an indeterminate push-to-talk binding state. Non-fatal.
Solutions
- Check errorText(e) for the backend cause.
- Ensure the voice/shortcut backend initializes before this status call (retry on ready).
- Verify `omnidisc_voice_ptt_status` and the global-shortcut plugin are registered in Tauri.
- Treat pttRegistered === null in the UI as 'unknown' and prompt the user to rebind.
- On Wayland, expect global shortcut restrictions; document or fall back to in-app hotkeys.
Example fix
// before
} catch (e) {
pttRegistered = null;
console.warn("[omnidisc] push-to-talk status unavailable", errorText(e));
}
// after
} catch (e) {
pttRegistered = null;
console.warn("[omnidisc] push-to-talk status unavailable", errorText(e));
onReady(() => refreshPttStatus()); // retry once the voice backend is initialized
} Defensive patterns
Strategy: fallback
Validate before calling
if (!isTauri()) { pttRegistered = null; return; } Type guard
function isTauri(): boolean {
return typeof window !== "undefined" && "__TAURI_INTERNALS__" in window;
} Try / catch
try {
const status = await invoke<{ binding: string; registered: boolean }>("omnidisc_voice_ptt_status");
pttRegistered = status.binding ? status.registered : null;
} catch (e) {
pttRegistered = null; // unknown; UI must handle null
console.warn("[omnidisc] push-to-talk status unavailable", errorText(e));
} Prevention
- Treat null pttRegistered as 'unknown' in UI, not false.
- Retry status fetch once the voice backend signals readiness.
- Register the global-shortcut plugin on all platforms.
- Document Wayland global-shortcut limitations and provide in-app fallback.
When it happens
Trigger: Calling the PTT status refresh when the backend command `omnidisc_voice_ptt_status` rejects: global-shortcut subsystem unavailable, voice backend not initialized, or command not registered.
Common situations: App startup before voice backend init; platform lacks global hotkey support (some Wayland setups); Tauri global-shortcut plugin not registered; browser dev mode.
Understand the failure class
Background: "API request failed": what wrapped HTTP errors from external APIs mean and how to find the real cause — this error's family across 29 libraries.
Related errors
- close failed
- create notebook failed
- e.to_string()
- notebooksStore.hydrate failed
- notebooksStore.refresh failed
AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12).
Data as JSON: /api/errors/6c351fa042e66489.
Report an issue: GitHub.
Appendix: source
Thrown at src/lib/stores/omnidisc-voice-store.svelte.ts:700
/**
* `null` while unknown or while no key is set; `false` when the OS refused to
* hand the combination over — Windows gives it to whoever asked first, macOS
* wants Accessibility permission. Both used to fail silently, so the key just
* did nothing.
*/
export function isPttRegistered(): boolean | null {
return pttRegistered;
}
export async function refreshPttStatus(): Promise<void> {
try {
const status = await invoke<{ binding: string; registered: boolean }>(
"omnidisc_voice_ptt_status",
);
pttRegistered = status.binding ? status.registered : null;
} catch (e) {
pttRegistered = null;
console.warn("[omnidisc] push-to-talk status unavailable", errorText(e));
}
}
export async function setVadThreshold(db: number): Promise<void> {
await updateSettings({ omnidisc: { voice: { vad_threshold_db: db } } });
}
export async function setDucking(percent: number): Promise<void> {
const clamped = Math.min(100, Math.max(0, Math.round(percent)));
try {
await invoke("omnidisc_voice_set_ducking", { percent: clamped });
} catch (e) {
console.warn("[omnidisc] ducking failed", errorText(e));
}
await updateSettings({ omnidisc: { voice: { ducking_percent: clamped } } });
}
export async function setRelayOnly(enabled: boolean): Promise<void> {View on GitHub (pinned to 8600b91f42)