diff --git a/src-tauri/src/managers/model.rs b/src-tauri/src/managers/model.rs index dc60dda..c664779 100644 --- a/src-tauri/src/managers/model.rs +++ b/src-tauri/src/managers/model.rs @@ -31,6 +31,8 @@ pub struct ModelInfo { pub partial_size: u64, pub is_directory: bool, pub engine_type: EngineType, + pub accuracy_score: f32, // 0.0 to 1.0, higher is more accurate + pub speed_score: f32, // 0.0 to 1.0, higher is faster } #[derive(Debug, Clone, Serialize, Deserialize)] @@ -62,6 +64,7 @@ impl ModelManager { let mut available_models = HashMap::new(); + // TODO this should be read from a JSON file or something.. available_models.insert( "small".to_string(), ModelInfo { @@ -76,6 +79,8 @@ impl ModelManager { partial_size: 0, is_directory: false, engine_type: EngineType::Whisper, + accuracy_score: 0.60, + speed_score: 0.85, }, ); @@ -94,6 +99,8 @@ impl ModelManager { partial_size: 0, is_directory: false, engine_type: EngineType::Whisper, + accuracy_score: 0.75, + speed_score: 0.60, }, ); @@ -111,6 +118,8 @@ impl ModelManager { partial_size: 0, is_directory: false, engine_type: EngineType::Whisper, + accuracy_score: 0.80, + speed_score: 0.40, }, ); @@ -128,10 +137,31 @@ impl ModelManager { partial_size: 0, is_directory: false, engine_type: EngineType::Whisper, + accuracy_score: 0.85, + speed_score: 0.30, + }, + ); + + // Add NVIDIA Parakeet models (directory-based) + available_models.insert( + "parakeet-tdt-0.6b-v2".to_string(), + ModelInfo { + id: "parakeet-tdt-0.6b-v2".to_string(), + name: "Parakeet V2".to_string(), + description: "English only. The best model for English speakers.".to_string(), + filename: "parakeet-tdt-0.6b-v2-int8".to_string(), // Directory name + url: Some("https://blob.handy.computer/parakeet-v2-int8.tar.gz".to_string()), + size_mb: 473, // Approximate size for int8 quantized model + is_downloaded: false, + is_downloading: false, + partial_size: 0, + is_directory: true, + engine_type: EngineType::Parakeet, + accuracy_score: 0.85, + speed_score: 0.85, }, ); - // Add NVIDIA Parakeet model (directory-based) available_models.insert( "parakeet-tdt-0.6b-v3".to_string(), ModelInfo { @@ -140,12 +170,14 @@ impl ModelManager { description: "Fast and accurate".to_string(), filename: "parakeet-tdt-0.6b-v3-int8".to_string(), // Directory name url: Some("https://blob.handy.computer/parakeet-v3-int8.tar.gz".to_string()), - size_mb: 850, // Approximate size for int8 quantized model + size_mb: 478, // Approximate size for int8 quantized model is_downloaded: false, is_downloading: false, partial_size: 0, is_directory: true, engine_type: EngineType::Parakeet, + accuracy_score: 0.80, + speed_score: 0.85, }, ); diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 78ba499..52c4eac 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -16,9 +16,9 @@ "label": "main", "title": "Handy", "width": 680, - "height": 520, + "height": 570, "minWidth": 680, - "minHeight": 520, + "minHeight": 570, "resizable": true, "maximizable": false, "visible": false diff --git a/src/App.tsx b/src/App.tsx index 1a6754f..054e327 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -4,7 +4,6 @@ import { Toaster } from "sonner"; import "./App.css"; import AccessibilityPermissions from "./components/AccessibilityPermissions"; import Footer from "./components/footer"; -import HandyTextLogo from "./components/icons/HandyTextLogo"; import Onboarding from "./components/onboarding"; import { Sidebar, SidebarSection, SECTIONS_CONFIG } from "./components/Sidebar"; import { useSettings } from "./hooks/useSettings"; @@ -67,14 +66,7 @@ function App() { }; if (showOnboarding) { - return ( -
-
- - -
-
- ); + return ; } return ( diff --git a/src/components/onboarding/ModelCard.tsx b/src/components/onboarding/ModelCard.tsx index 4dafd9a..ff5141b 100644 --- a/src/components/onboarding/ModelCard.tsx +++ b/src/components/onboarding/ModelCard.tsx @@ -2,12 +2,12 @@ import React from "react"; import { Download } from "lucide-react"; import { ModelInfo } from "../../lib/types"; import { formatModelSize } from "../../lib/utils/format"; +import Badge from "../ui/Badge"; interface ModelCardProps { model: ModelInfo; variant?: "default" | "featured"; disabled?: boolean; - badgeText?: string; className?: string; onSelect: (modelId: string) => void; } @@ -16,31 +16,18 @@ const ModelCard: React.FC = ({ model, variant = "default", disabled = false, - badgeText, className = "", onSelect, }) => { const isFeatured = variant === "featured"; const baseButtonClasses = - "relative rounded-xl p-3 p-4 text-left transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-logo-primary/25 active:scale-[0.98] cursor-pointer group"; + "flex justify-between items-center rounded-xl p-3 px-4 text-left transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-logo-primary/25 active:scale-[0.98] cursor-pointer group"; const variantClasses = isFeatured - ? "border-2 border-logo-primary/40 bg-logo-primary/5 hover:border-logo-primary/60 hover:bg-logo-primary/10 hover:shadow-lg hover:scale-[1.02] disabled:hover:border-logo-primary/40 disabled:hover:bg-logo-primary/5 disabled:hover:shadow-none disabled:hover:scale-100" + ? "border-2 border-logo-primary/25 bg-logo-primary/5 hover:border-logo-primary/40 hover:bg-logo-primary/8 hover:shadow-lg hover:scale-[1.02] disabled:hover:border-logo-primary/25 disabled:hover:bg-logo-primary/5 disabled:hover:shadow-none disabled:hover:scale-100" : "border-2 border-mid-gray/20 hover:border-logo-primary/50 hover:bg-logo-primary/5 hover:shadow-lg hover:scale-[1.02] disabled:hover:border-mid-gray/20 disabled:hover:bg-transparent disabled:hover:shadow-none disabled:hover:scale-100"; - const titleClasses = - "text-lg font-semibold text-text group-hover:text-logo-primary transition-colors"; - - const descriptionClasses = "text-text/60 text-sm leading-relaxed"; - - const sizeRowClasses = - "mt-1 flex items-center gap-2 text-xs text-text/60 tabular-nums"; - - const containerSpacing = "space-y-3"; - - const sizeIconClasses = "h-3.5 w-3.5 text-text/45"; - return (