Skip to content

Voice-to-text dictation app with local (Nvidia Parakeet/Whisper) and cloud models (BYOK). Privacy-first and available cross-platform.

feat(ux): improve GPU Acceleration crash Retry button UX and discovery (#1913)

Idris Gadi80021db8bbcd
diff --git a/src/components/ReasoningModelSelector.tsx b/src/components/ReasoningModelSelector.tsx
index 6cd9a5716..3a5cb88f7 100644
--- a/src/components/ReasoningModelSelector.tsx
+++ b/src/components/ReasoningModelSelector.tsx
@@ -8,7 +8,7 @@ import type {
InferenceMode,
} from "../types/electron";
import { Button } from "./ui/button";
-import { Cloud, Lock, Zap } from "lucide-react";
+import { CircleAlert, Cloud, Lock, Zap } from "lucide-react";
import ApiKeyInput from "./ui/ApiKeyInput";
import ModelCardList from "./ui/ModelCardList";
import LocalModelPicker, { type LocalProvider } from "./LocalModelPicker";
@@ -245,23 +245,33 @@ function GpuStatusBadge() {
// State 6: Activation failed
if (!isGpu && activationFailed) {
return (
- <div className="flex items-center gap-1.5 mt-2 px-1">
- <span className="inline-block w-1.5 h-1.5 rounded-full shrink-0 bg-warning" />
- <span className="text-xs text-muted-foreground">{t("gpu.activationFailed")}</span>
- <button
- type="button"
- onClick={handleRetry}
- className="text-xs text-muted-foreground hover:text-foreground transition-colors ml-1"
- >
- {t("gpu.retry")}
- </button>
- <button
+ <div className="mt-2 flex items-start justify-between gap-3 rounded-md border border-warning/40 bg-warning/5 p-2.5">
+ <div className="flex min-w-0 items-start gap-2">
+ <CircleAlert size={15} className="mt-0.5 shrink-0 text-warning" />
+ <div className="min-w-0">
+ <p className="text-xs font-medium text-foreground">{t("gpu.activationFailed")}</p>
+ <p className="mt-0.5 text-xs leading-snug text-muted-foreground">
+ {t("gpu.reasoningActivationFailedDescription")}
+ </p>
+ <Button
+ type="button"
+ onClick={handleRetry}
+ size="sm"
+ className="mt-2 h-7 px-3 text-xs"
+ >
+ {t("gpu.retryActivation")}
+ </Button>
+ </div>
+ </div>
+ <Button
type="button"
onClick={handleDelete}
- className="text-xs text-muted-foreground hover:text-foreground transition-colors ml-auto"
+ size="sm"
+ variant="ghost"
+ className="h-6 shrink-0 px-2 text-xs text-muted-foreground hover:text-destructive"
>
{t("gpu.remove")}
- </button>
+ </Button>
</div>
);
}
diff --git a/src/components/TranscriptionModelPicker.tsx b/src/components/TranscriptionModelPicker.tsx
index b5a662cc8..6473d02cd 100644
--- a/src/components/TranscriptionModelPicker.tsx
+++ b/src/components/TranscriptionModelPicker.tsx
@@ -3,7 +3,7 @@ import { useTranslation } from "react-i18next";
import { Button } from "./ui/button";
import { Input } from "./ui/input";
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "./ui/select";
-import { Download, Trash2, Cloud, Lock, X, Zap, Check } from "lucide-react";
+import { Download, Trash2, Cloud, Lock, X, Zap, Check, CircleAlert } from "lucide-react";
import { ProviderIcon } from "./ui/ProviderIcon";
import { ProviderTabs } from "./ui/ProviderTabs";
import ModelCardList from "./ui/ModelCardList";
@@ -1305,55 +1305,79 @@ export default function TranscriptionModelPicker({
!gpuDismissed &&
!gpuDownloading &&
gpuBackend && (
- <div className="rounded-md border border-border bg-surface-1 p-2.5">
+ <div
+ className={`rounded-md border p-2.5 ${
+ gpuDownloaded && gpuFailed
+ ? "border-warning/40 bg-warning/5"
+ : "border-border bg-surface-1"
+ }`}
+ >
{gpuDownloaded ? (
- <div className="flex items-center justify-between">
- <div className="flex items-center gap-1.5">
- {gpuFailed ? (
- <>
- <span className="inline-block w-1.5 h-1.5 rounded-full shrink-0 bg-warning" />
- <span className="text-xs font-medium text-foreground">
+ gpuFailed ? (
+ <div className="flex items-start justify-between gap-3">
+ <div className="flex min-w-0 items-start gap-2">
+ <CircleAlert size={15} className="mt-0.5 shrink-0 text-warning" />
+ <div className="min-w-0">
+ <p className="text-xs font-medium text-foreground">
{t("gpu.activationFailed")}
- </span>
- <button
+ </p>
+ <p className="mt-0.5 text-xs leading-snug text-muted-foreground">
+ {t("gpu.activationFailedDescription")}
+ </p>
+ <Button
onClick={handleGpuRetry}
- className="text-xs text-muted-foreground hover:text-foreground transition-colors ml-1"
+ size="sm"
+ className="mt-2 h-7 px-3 text-xs"
>
- {t("gpu.retry")}
- </button>
- </>
- ) : gpuActivating ? (
- <>
- <span className="inline-block w-1.5 h-1.5 rounded-full shrink-0 bg-primary animate-pulse" />
- <span className="text-xs font-medium text-foreground">
- {t("gpu.activating")}
- </span>
- </>
- ) : gpuActive ? (
- <>
- <Check size={13} className="text-success" />
- <span className="text-xs font-medium text-foreground">
- {t("gpu.active")}
- </span>
- </>
- ) : (
- <>
- <span className="inline-block w-1.5 h-1.5 rounded-full shrink-0 bg-primary" />
- <span className="text-xs font-medium text-foreground">
- {t("gpu.ready")}
- </span>
- </>
- )}
+ {t("gpu.retryActivation")}
+ </Button>
+ </div>
+ </div>
+ <Button
+ onClick={handleGpuDelete}
+ size="sm"
+ variant="ghost"
+ className="h-6 shrink-0 px-2 text-xs text-muted-foreground hover:text-destructive"
+ >
+ {t("gpu.remove")}
+ </Button>
</div>
- <Button
- onClick={handleGpuDelete}
- size="sm"
- variant="ghost"
- className="h-6 px-2 text-xs text-muted-foreground hover:text-destructive"
- >
- {t("gpu.remove")}
- </Button>
- </div>
+ ) : (
+ <div className="flex items-center justify-between">
+ <div className="flex items-center gap-1.5">
+ {gpuActivating ? (
+ <>
+ <span className="inline-block w-1.5 h-1.5 rounded-full shrink-0 bg-primary animate-pulse" />
+ <span className="text-xs font-medium text-foreground">
+ {t("gpu.activating")}
+ </span>
+ </>
+ ) : gpuActive ? (
+ <>
+ <Check size={13} className="text-success" />
+ <span className="text-xs font-medium text-foreground">
+ {t("gpu.active")}
+ </span>
+ </>
+ ) : (
+ <>
+ <span className="inline-block w-1.5 h-1.5 rounded-full shrink-0 bg-primary" />
+ <span className="text-xs font-medium text-foreground">
+ {t("gpu.ready")}
+ </span>
+ </>
+ )}
+ </div>
+ <Button
+ onClick={handleGpuDelete}
+ size="sm"
+ variant="ghost"
+ className="h-6 px-2 text-xs text-muted-foreground hover:text-destructive"
+ >
+ {t("gpu.remove")}
+ </Button>
+ </div>
+ )
) : (
<div className="flex items-start gap-2.5">
<Zap size={13} className="text-primary shrink-0 mt-0.5" />
diff --git a/src/hooks/useMainProcessNotifications.tsx b/src/hooks/useMainProcessNotifications.tsx
index 871805469..e818fb58f 100644
--- a/src/hooks/useMainProcessNotifications.tsx
+++ b/src/hooks/useMainProcessNotifications.tsx
@@ -36,10 +36,26 @@ export function useMainProcessNotifications({
});
const showGpuFallbackToast = () => {
- toast({
+ let toastId: string;
+ toastId = toast({
title: t("app.toasts.gpuFallback.title"),
description: t("app.toasts.gpuFallback.description"),
duration: 10000,
+ action: (
+ <button
+ onClick={async () => {
+ try {
+ const result = await window.electronAPI?.whisperGpuRetry?.();
+ if (result?.success) dismiss(toastId);
+ } catch {
+ // silently fail — toast stays up for another attempt
+ }
+ }}
+ className="rounded-sm border border-white/20 bg-white/10 px-2.5 py-1 text-[10px] font-medium whitespace-nowrap text-white/90 transition-colors hover:border-white/35 hover:bg-white/20 hover:text-white"
+ >
+ {t("app.toasts.gpuFallback.retry")}
+ </button>
+ ),
});
};
const unsubscribeCudaFallback =
diff --git a/src/locales/de/translation.json b/src/locales/de/translation.json
index 23641101e..5edd69b49 100644
--- a/src/locales/de/translation.json
+++ b/src/locales/de/translation.json
@@ -3413,8 +3413,10 @@
"active": "GPU-Beschleunigung aktiv",
"ready": "GPU-Beschleunigung bereit",
"activating": "GPU wird aktiviert...",
- "activationFailed": "GPU konnte nicht aktiviert werden",
- "retry": "Erneut versuchen",
+ "activationFailed": "GPU-Beschleunigung nicht verfügbar",
+ "activationFailedDescription": "OpenWhispr verwendet die CPU-Transkription.",
+ "reasoningActivationFailedDescription": "OpenWhispr verwendet die CPU-Verarbeitung.",
+ "retryActivation": "GPU-Beschleunigung erneut versuchen",
"remove": "Entfernen",
"dismiss": "Nicht jetzt",
"cancel": "Abbrechen"
@@ -3437,7 +3439,8 @@
},
"gpuFallback": {
"title": "GPU-Beschleunigung nicht verfügbar",
- "description": "Die Transkription verwendet stattdessen die CPU. Du kannst die GPU-Beschleunigung in den Einstellungen deaktivieren."
+ "description": "OpenWhispr verwendet die CPU-Transkription.",
+ "retry": "GPU erneut versuchen"
},
"gpuPackMigration": {
"title": "GPU-Paket muss erneut heruntergeladen werden",
diff --git a/src/locales/en/translation.json b/src/locales/en/translation.json
index 99f48d1d6..97ff0730f 100644
--- a/src/locales/en/translation.json
+++ b/src/locales/en/translation.json
@@ -3413,8 +3413,10 @@
"active": "GPU acceleration active",
"ready": "GPU acceleration ready",
"activating": "Activating GPU...",
- "activationFailed": "GPU could not be activated",
- "retry": "Retry",
+ "activationFailed": "GPU acceleration unavailable",
+ "activationFailedDescription": "OpenWhispr switched to CPU transcription.",
+ "reasoningActivationFailedDescription": "OpenWhispr switched to CPU processing.",
+ "retryActivation": "Retry GPU acceleration",
"remove": "Remove",
"dismiss": "Not now",
"cancel": "Cancel"
@@ -3437,7 +3439,8 @@
},
"gpuFallback": {
"title": "GPU acceleration unavailable",
- "description": "Transcription is using the CPU instead. You can disable GPU acceleration in Settings."
+ "description": "OpenWhispr switched to CPU transcription.",
+ "retry": "Retry GPU"
},
"gpuPackMigration": {
"title": "GPU pack needs re-downloading",
diff --git a/src/locales/es/translation.json b/src/locales/es/translation.json
index f40bac70b..191326bfb 100644
--- a/src/locales/es/translation.json
+++ b/src/locales/es/translation.json
@@ -3296,8 +3296,10 @@
"active": "Aceleración GPU activa",
"ready": "Aceleración GPU lista",
"activating": "Activando GPU...",
- "activationFailed": "No se pudo activar la GPU",
- "retry": "Reintentar",
+ "activationFailed": "Aceleración GPU no disponible",
+ "activationFailedDescription": "OpenWhispr cambió a la transcripción por CPU.",
+ "reasoningActivationFailedDescription": "OpenWhispr cambió al procesamiento por CPU.",
+ "retryActivation": "Reintentar aceleración GPU",
"remove": "Eliminar",
"dismiss": "Ahora no",
"cancel": "Cancelar"
@@ -3320,7 +3322,8 @@
},
"gpuFallback": {
"title": "Aceleración GPU no disponible",
- "description": "La transcripción está usando la CPU. Puedes desactivar la aceleración GPU en Configuración."
+ "description": "OpenWhispr cambió a la transcripción por CPU.",
+ "retry": "Reintentar GPU"
},
"gpuPackMigration": {
"title": "Es necesario volver a descargar el paquete GPU",
diff --git a/src/locales/fr/translation.json b/src/locales/fr/translation.json
index 6463f5e1d..280c64364 100644
--- a/src/locales/fr/translation.json
+++ b/src/locales/fr/translation.json
@@ -3413,8 +3413,10 @@
"active": "Accélération GPU active",
"ready": "Accélération GPU prête",
"activating": "Activation du GPU...",
- "activationFailed": "Impossible d'activer le GPU",
- "retry": "Réessayer",
+ "activationFailed": "Accélération GPU indisponible",
+ "activationFailedDescription": "OpenWhispr est passé à la transcription par CPU.",
+ "reasoningActivationFailedDescription": "OpenWhispr est passé au traitement par CPU.",
+ "retryActivation": "Réessayer l'accélération GPU",
"remove": "Supprimer",
"dismiss": "Pas maintenant",
"cancel": "Annuler"
@@ -3437,7 +3439,8 @@
},
"gpuFallback": {
"title": "Accélération GPU indisponible",
- "description": "La transcription utilise le CPU à la place. Vous pouvez désactiver l'accélération GPU dans les paramètres."
+ "description": "OpenWhispr est passé à la transcription par CPU.",
+ "retry": "Réessayer le GPU"
},
"gpuPackMigration": {
"title": "Le pack GPU doit être retéléchargé",
diff --git a/src/locales/it/translation.json b/src/locales/it/translation.json
index 0e50eea26..d2bea11b8 100644
--- a/src/locales/it/translation.json
+++ b/src/locales/it/translation.json
@@ -3248,8 +3248,10 @@
"active": "Accelerazione GPU attiva",
"ready": "Accelerazione GPU pronta",
"activating": "Attivazione GPU...",
- "activationFailed": "Impossibile attivare la GPU",
- "retry": "Riprova",
+ "activationFailed": "Accelerazione GPU non disponibile",
+ "activationFailedDescription": "OpenWhispr sta usando la trascrizione CPU.",
+ "reasoningActivationFailedDescription": "OpenWhispr sta usando l'elaborazione CPU.",
+ "retryActivation": "Riprova l'accelerazione GPU",
"remove": "Rimuovi",
"dismiss": "Non ora",
"cancel": "Annulla"
@@ -3272,7 +3274,8 @@
},
"gpuFallback": {
"title": "Accelerazione GPU non disponibile",
- "description": "La trascrizione sta usando la CPU. Puoi disattivare l'accelerazione GPU nelle Impostazioni."
+ "description": "OpenWhispr sta usando la trascrizione CPU.",
+ "retry": "Riprova GPU"
},
"gpuPackMigration": {
"title": "Il pacchetto GPU deve essere scaricato di nuovo",
diff --git a/src/locales/ja/translation.json b/src/locales/ja/translation.json
index 2169d40da..e41d0b36b 100644
--- a/src/locales/ja/translation.json
+++ b/src/locales/ja/translation.json
@@ -3248,8 +3248,10 @@
"active": "GPU アクセラレーション有効",
"ready": "GPUアクセラレーション準備完了",
"activating": "GPU を有効化中...",
- "activationFailed": "GPU を有効化できませんでした",
- "retry": "再試行",
+ "activationFailed": "GPU アクセラレーションを利用できません",
+ "activationFailedDescription": "OpenWhispr は CPU 文字起こしに切り替えました。",
+ "reasoningActivationFailedDescription": "OpenWhispr は CPU 処理に切り替えました。",
+ "retryActivation": "GPU アクセラレーションを再試行",
"remove": "削除",
"dismiss": "後で",
"cancel": "キャンセル"
@@ -3272,7 +3274,8 @@
},
"gpuFallback": {
"title": "GPU アクセラレーションを利用できません",
- "description": "文字起こしは代わりに CPU を使用しています。設定で GPU アクセラレーションを無効にできます。"
+ "description": "OpenWhispr は CPU 文字起こしに切り替えました。",
+ "retry": "GPU を再試行"
},
"gpuPackMigration": {
"title": "GPU パックの再ダウンロードが必要です",
diff --git a/src/locales/pt/translation.json b/src/locales/pt/translation.json
index ea5bdb0d8..c0a1d4708 100644
--- a/src/locales/pt/translation.json
+++ b/src/locales/pt/translation.json
@@ -3248,8 +3248,10 @@
"active": "Aceleração GPU ativa",
"ready": "Aceleração GPU pronta",
"activating": "Ativando GPU...",
- "activationFailed": "Não foi possível ativar a GPU",
- "retry": "Tentar novamente",
+ "activationFailed": "Aceleração GPU indisponível",
+ "activationFailedDescription": "OpenWhispr mudou para a transcrição por CPU.",
+ "reasoningActivationFailedDescription": "OpenWhispr mudou para o processamento por CPU.",
+ "retryActivation": "Tentar aceleração por GPU novamente",
"remove": "Remover",
"dismiss": "Agora não",
"cancel": "Cancelar"
@@ -3272,7 +3274,8 @@
},
"gpuFallback": {
"title": "Aceleração GPU indisponível",
- "description": "A transcrição está usando a CPU. Você pode desativar a aceleração GPU nas Configurações."
+ "description": "OpenWhispr mudou para a transcrição por CPU.",
+ "retry": "Tentar GPU novamente"
},
"gpuPackMigration": {
"title": "O pacote GPU precisa ser baixado novamente",
diff --git a/src/locales/ru/translation.json b/src/locales/ru/translation.json
index 586fbcc27..8280f4e76 100644
--- a/src/locales/ru/translation.json
+++ b/src/locales/ru/translation.json
@@ -3276,8 +3276,10 @@
"active": "Ускорение GPU активно",
"ready": "Ускорение GPU готово",
"activating": "Активация GPU...",
- "activationFailed": "Не удалось активировать GPU",
- "retry": "Повторить",
+ "activationFailed": "Ускорение GPU недоступно",
+ "activationFailedDescription": "OpenWhispr переключился на транскрипцию на CPU.",
+ "reasoningActivationFailedDescription": "OpenWhispr переключился на обработку на CPU.",
+ "retryActivation": "Повторить ускорение GPU",
"remove": "Удалить",
"dismiss": "Не сейчас",
"cancel": "Отмена"
@@ -3300,7 +3302,8 @@
},
"gpuFallback": {
"title": "Ускорение GPU недоступно",
- "description": "Транскрипция выполняется на CPU. Вы можете отключить ускорение GPU в настройках."
+ "description": "OpenWhispr переключился на транскрипцию на CPU.",
+ "retry": "Повторить GPU"
},
"gpuPackMigration": {
"title": "Требуется повторная загрузка GPU-пакета",
diff --git a/src/locales/zh-CN/translation.json b/src/locales/zh-CN/translation.json
index f64a40986..230afe850 100644
--- a/src/locales/zh-CN/translation.json
+++ b/src/locales/zh-CN/translation.json
@@ -3248,8 +3248,10 @@
"active": "GPU 加速已启用",
"ready": "GPU 加速已就绪",
"activating": "正在激活 GPU...",
- "activationFailed": "无法激活 GPU",
- "retry": "重试",
+ "activationFailed": "GPU 加速不可用",
+ "activationFailedDescription": "OpenWhispr 已切换为 CPU 转录。",
+ "reasoningActivationFailedDescription": "OpenWhispr 已切换为 CPU 处理。",
+ "retryActivation": "重试 GPU 加速",
"remove": "移除",
"dismiss": "暂不启用",
"cancel": "取消"
@@ -3272,7 +3274,8 @@
},
"gpuFallback": {
"title": "GPU 加速不可用",
- "description": "转录正在使用 CPU。你可以在设置中关闭 GPU 加速。"
+ "description": "OpenWhispr 已切换为 CPU 转录。",
+ "retry": "重试 GPU"
},
"gpuPackMigration": {
"title": "需要重新下载 GPU 加速包",
diff --git a/src/locales/zh-TW/translation.json b/src/locales/zh-TW/translation.json
index 4e139fd35..333f7b732 100644
--- a/src/locales/zh-TW/translation.json
+++ b/src/locales/zh-TW/translation.json
@@ -3248,8 +3248,10 @@
"active": "GPU 加速已啟用",
"ready": "GPU 加速已就緒",
"activating": "正在啟動 GPU...",
- "activationFailed": "無法啟動 GPU",
- "retry": "重試",
+ "activationFailed": "GPU 加速無法使用",
+ "activationFailedDescription": "OpenWhispr 已切換為 CPU 轉錄。",
+ "reasoningActivationFailedDescription": "OpenWhispr 已切換為 CPU 處理。",
+ "retryActivation": "重試 GPU 加速",
"remove": "移除",
"dismiss": "暫時不要",
"cancel": "取消"
@@ -3272,7 +3274,8 @@
},
"gpuFallback": {
"title": "GPU 加速無法使用",
- "description": "轉錄正在使用 CPU。你可以在設定中關閉 GPU 加速。"
+ "description": "OpenWhispr 已切換為 CPU 轉錄。",
+ "retry": "重試 GPU"
},
"gpuPackMigration": {
"title": "需要重新下載 GPU 加速包",