feat: flexible Whisper installation options for different system configurations (#63)
* fix: VOSK-only install and CLI arg handling for low-memory systems Fixes several issues reported by users on low-memory systems (8GB RAM): 1. Install script: Don't auto-install Whisper in non-interactive mode - Previously, running 'curl | bash' would install Whisper by default - Now requires explicit --with-whisper flag to install Whisper - Prevents OOM errors on systems with limited RAM 2. CLI arguments: Command-line flags now properly override saved config - --engine vosk now works even if config file has whisper set - --model flag also properly overrides saved model setting - Checks sys.argv to detect if user explicitly provided arguments 3. Default engine: Changed from 'whisper' to 'vosk' - VOSK works on low-memory systems without OOM issues - Users can still install and use Whisper with --with-whisper flag - Existing configs with 'whisper' engine are still respected Reported issues: - OOM during installation on 8GB RAM system - vocalinux --engine vosk being ignored - Config file not respected when trying to force VOSK * fix: keep whisper as default engine, improve test robustness - Reverted default engine back to 'whisper' for better accuracy - Install script still defaults to VOSK-only install (--with-whisper for Whisper) - CLI args still properly override saved config - Improved test_config_manager tests to handle module caching issues * fix: default to Whisper install, --no-whisper for VOSK-only on low-RAM systems Updated install behavior: - Default (curl|bash): Installs Whisper for best experience - --no-whisper flag: Skips Whisper AND creates config with VOSK as default engine This allows low-RAM users (8GB) to run: curl -fsSL .../install.sh | bash -s -- --no-whisper Which will: 1. Skip installing torch/whisper (avoids OOM) 2. Create ~/.config/vocalinux/config.json with engine='vosk' 3. App will use VOSK by default without needing CLI flags * docs: clarify --no-whisper is for low-RAM systems (8GB or less) Updated README and website to explain that --no-whisper flag: - Is intended for systems with 8GB RAM or less - Avoids out-of-memory errors during installation - Configures VOSK as the default speech recognition engine * feat: add --whisper-cpu flag for CPU-only PyTorch installation New installation option for users without NVIDIA GPU or with limited RAM: Install script changes: - Added --whisper-cpu flag: Installs CPU-only PyTorch (~200MB vs ~2.3GB) - Uses https://download.pytorch.org/whl/cpu index for smaller torch package - Interactive mode now offers 3 options: GPU, CPU-only, or skip Whisper - Updated help text to explain all Whisper installation options Documentation updates: - README: Added --whisper-cpu example with explanation - Website: Added new 'Whisper CPU-only' install option section Installation options summary: - Default (curl|bash): Whisper + GPU/CUDA support (~2.3GB, 5-10 min) - --whisper-cpu: Whisper + CPU-only PyTorch (~200MB, 3-4 min) - --no-whisper: VOSK only, no Whisper (~2-3 min)
This commit is contained in:
+35
-4
@@ -43,6 +43,10 @@ const oneClickInstallCommand = `curl \\
|
||||
-fsSL https://raw.githubusercontent.com/jatinkrmalik/vocalinux/main/install.sh \\
|
||||
| bash`;
|
||||
|
||||
const oneClickInstallWhisperCpu = `curl \\
|
||||
-fsSL https://raw.githubusercontent.com/jatinkrmalik/vocalinux/main/install.sh \\
|
||||
| bash -s -- --whisper-cpu`;
|
||||
|
||||
const oneClickInstallNoWhisper = `curl \\
|
||||
-fsSL https://raw.githubusercontent.com/jatinkrmalik/vocalinux/main/install.sh \\
|
||||
| bash -s -- --no-whisper`;
|
||||
@@ -603,16 +607,43 @@ export default function HomePage() {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Alternative install */}
|
||||
{/* Alternative install - CPU only */}
|
||||
<div className="border-t border-zinc-200 dark:border-zinc-700 pt-6">
|
||||
<div className="flex items-center gap-3 mb-4">
|
||||
<div className="bg-blue-500/10 p-2 rounded-lg">
|
||||
<Zap className="h-5 w-5 text-blue-500" />
|
||||
<Cpu className="h-5 w-5 text-blue-500" />
|
||||
</div>
|
||||
<div className="flex-1">
|
||||
<h3 className="text-lg font-semibold">Quick Install (VOSK only)</h3>
|
||||
<h3 className="text-lg font-semibold">Whisper CPU-only</h3>
|
||||
<p className="text-sm text-muted-foreground">
|
||||
Faster install, lighter on resources (~2-3 min)
|
||||
Smaller download (~200MB vs ~2.3GB) - no NVIDIA GPU needed (~3-4 min)
|
||||
</p>
|
||||
</div>
|
||||
<CopyButton text={oneClickInstallWhisperCpu} />
|
||||
</div>
|
||||
<div className="overflow-x-auto">
|
||||
<SyntaxHighlighter
|
||||
language="bash"
|
||||
style={atomOneDark}
|
||||
className="rounded-lg text-sm"
|
||||
customStyle={{ margin: 0, maxWidth: '100%', overflowX: 'auto' }}
|
||||
wrapLongLines={false}
|
||||
>
|
||||
{oneClickInstallWhisperCpu}
|
||||
</SyntaxHighlighter>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Alternative install - VOSK only */}
|
||||
<div className="border-t border-zinc-200 dark:border-zinc-700 pt-6">
|
||||
<div className="flex items-center gap-3 mb-4">
|
||||
<div className="bg-green-500/10 p-2 rounded-lg">
|
||||
<Zap className="h-5 w-5 text-green-500" />
|
||||
</div>
|
||||
<div className="flex-1">
|
||||
<h3 className="text-lg font-semibold">VOSK only (lightest)</h3>
|
||||
<p className="text-sm text-muted-foreground">
|
||||
For low-RAM systems (8GB or less) - skips Whisper entirely (~2-3 min)
|
||||
</p>
|
||||
</div>
|
||||
<CopyButton text={oneClickInstallNoWhisper} />
|
||||
|
||||
Reference in New Issue
Block a user