$ show xiaochong/hi-kid
HiKid is an Electron desktop application designed for children in non-English-speaking countries to practice English speaking and listening. It features a local voice conversation pipeline where user speech is processed through SoX recording, local ASR/Qwen3-ASR-0.6B for speech-to-text, Ollama/LLM for response generation, and local TTS/kitten-tts-server for speech synthesis, all playing back through SoX. The application centers around an animated Kitten character that changes expression based on conversation state (idle, listening, thinking, speaking, interrupted). Key features include customizable AI configuration (name, system prompt, LLM parameters), speaking games with rule explanations, automatic dependency checking and model downloading, subtitle toggle for conversation text, and both press-and-hold and VAD voice activation modes. The architecture follows the standard electron-vite three-process structure with clear separation between main process (handling audio/Agent logic), preload script (IPC bridge), and renderer process (React SPA).
The LLM identified 3 files worth highlighting for reuse:
Implements a robust download manager with HTTP range request support for resumable downloads, abort capability via AbortController, progress tracking, and archive extraction (tar/zip). Demonstrates non-obvious skill in handling network interruptions, retry logic, and proper resource cleanup while providing real-time progress updates to the renderer process through IPC.
A self-contained React component that renders an animated Kitten character whose expressions and animations change based on conversation state (idle, listening, thinking, speaking, interrupted). Uses only CSS animations (no JavaScript animation loops) for breathing, blinking, ear movements, mouth animations, and blush effects, demonstrating sophisticated SVG animation techniques that are fully reusable in any React application with just a state prop.
Manages application configuration with loading from ~/.config/hi-kid/config.json, validation of all fields, merging with defaults, atomic writes (write to temp file then rename) to prevent corruption, and setting appropriate file permissions (0o600). Provides a clean interface for getting and setting configuration with proper error handling and fallback to defaults, making it a reusable configuration management utility for any desktop application.