Commit Graph
102 Commits
Author SHA1 Message Date
Jatin K MalikandGitHub d140146490 feat: add interactive installer with GPU auto-detection (#88)
* feat: add interactive installer with GPU auto-detection

This commit enhances the Vocalinux installation experience with:

- GPU auto-detection: Automatically detects NVIDIA GPU presence
  and selects CPU-only Whisper when no GPU is present
- New --interactive flag: Friendly guided installation for new users
  with 4-step flow (system info, engine choice, variant, models)
- Beautiful welcome message: Clear post-install instructions
  with next steps, tips, and help links
- Website updates: New interactive install section at top

Changes:
- install.sh: Add detect_nvidia_gpu(), run_interactive_install(),
  print_welcome_message() functions
- install.sh: Add INTERACTIVE_MODE, HAS_NVIDIA_GPU variables
- install.sh: Add --interactive|-i command-line flag
- install.sh: Auto-detect GPU in non-interactive mode
- web/src/app/page.tsx: Add interactiveInstallCommand section
- README.md: Add interactive install section at top

The installer now saves ~2GB of bandwidth for users without
NVIDIA GPUs by automatically selecting CPU-only PyTorch.

* fix: clarify website install options - remove duplicate 'Recommended' label

* fix: change CPU-only install icon color to cyan

* fix: polish interactive installer output

* chore: register typescript eslint plugin
2026-02-04 20:28:48 -08:00
Jatin K MalikandGitHub 22ab96cea7 feat: add Wayland support for keyboard shortcuts using evdev backend (#81)
* feat: add Wayland support for keyboard shortcuts using evdev backend

This commit adds multi-backend support for keyboard shortcuts, enabling
them to work on Wayland sessions where pynput does not work.

**Changes:**
- New `keyboard_backends/` package with modular backend system
  - `base.py`: Abstract base class for keyboard backends
  - `pynput_backend.py`: Existing pynput implementation (X11/XWayland)
  - `evdev_backend.py`: New evdev implementation (X11 & Wayland)
  - `__init__.py`: Backend factory with auto-detection

- Updated `keyboard_shortcuts.py`:
  - Refactored to use backend system
  - Auto-detects session type (X11 vs Wayland)
  - Selects appropriate backend automatically
  - Provides helpful error messages when shortcuts unavailable

- Added `evdev>=1.6.0` to dependencies (Linux only)

- Comprehensive test updates:
  - 21 tests pass covering all backends
  - Tests for session detection
  - Tests for backend factory
  - Tests for permission hints

**User Impact:**
- Keyboard shortcuts now work on Wayland when user is in 'input' group
- Clear error messages guide users to fix permission issues
- Backward compatible with X11 (pynput backend)

**Setup for Wayland:**
```bash
sudo usermod -a -G input $USER
# Log out and log back in
```

Related to #80

* style: fix flake8 issues in evdev_backend.py

- Remove unused import 'categorize'
- Remove unused variable 'dev'

* style: fix remaining flake8 issues in tests

- Remove unused 'time' import
- Remove unused 'result' variable
- Remove unused 'backend_cls' variable
- Break long line to stay under 100 characters

* style: apply black and isort formatting to pass CI

* feat: auto-configure Wayland keyboard shortcuts during installation

Automatically detect Wayland sessions during installation and add the user
to the 'input' group required for evdev-based keyboard shortcuts.

This eliminates the need for users to manually configure permissions
after installation on Wayland systems.

* fix: escape commit message in Detect Changes step to handle special characters

The commit message was being directly inserted into the bash comparison,
which broke when the message contained special characters like parentheses.
Fix by assigning to a variable first.

* chore: drop unrelated installer/web changes

* fix: fall back to evdev backend

* style: format keyboard shortcut imports
2026-02-04 20:14:58 -08:00
Jatin K MalikandGitHub c9810dc7f5 fix: Lazy GTK imports for better pip/pipx compatibility (#49)
* fix: Lazy GTK imports for better pip/pipx compatibility

- Move GTK-dependent imports (tray_indicator) inside main() function
- Import after check_dependencies() so users get helpful error messages
- Update ui/__init__.py to not import tray_indicator at module level
- Update vocalinux/__init__.py to not import GTK-dependent modules
- Improved error messages for pip/pipx users with missing GTK typelibs
- Bump version to 0.2.1-alpha

This fixes the 'Namespace AppIndicator3 not available' error that
pip/pipx users encounter because PyGObject can't find system typelibs.

Closes #47

* test: simplify settings dialog tests

* style: fix lazy import ordering
2026-02-04 19:55:54 -08:00
Jatin K MalikandGitHub 9decf120db fix: clean up pagespeed follow-ups (#120) 2026-02-04 19:36:44 -08:00
Jatin K MalikandGitHub 0d9c488d82 fix: optimize PageSpeed Insights performance (#115)
* fix: optimize PageSpeed Insights performance

This commit addresses several PageSpeed Insights issues to improve
the performance score from 56 to a target of 90+.

Changes:
- Add SWC config to output modern ES2022 JavaScript, eliminating
  unnecessary polyfills (~12 KiB savings)
- Convert vocalinux.png to WebP format (17KB vs 207KB - 92% reduction)
- Add OptimizedImage component with WebP/PNG fallback support
- Add _headers file for proper static asset caching (1 year cache
  for immutable assets)
- Configure Next.js with optimizePackageImports for framer-motion
  and lucide-react
- Fix heading hierarchy issue (Quick Install h3 -> h2)
- Add console.log removal in production builds

Expected improvements:
- Image delivery: ~41 KiB savings
- Legacy JavaScript: ~12 KiB savings
- Cache lifetime: 754 KiB proper caching
- Accessibility score: 98 -> 100 (heading order fix)

* test: add coverage for PageSpeed optimization

Add comprehensive test suite for PageSpeed Insights optimization changes:

- WebP image loading tests (optimized-image.tsx)
- next/image component configuration tests (next.config.js)
- _headers file generation and cache header tests
- Lazy loading behavior tests

Includes:
- Jest configuration with TypeScript support
- React Testing Library setup
- 54 test cases covering all PageSpeed optimization features
- Build verification

All tests pass: npm run test
Build passes: npm run build

* ci: trigger workflow

* ci: trigger workflow run

* ci: trigger workflow
2026-02-04 19:25:34 -08:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
5e7fcc5578 build(deps-dev): bump brace-expansion from 1.1.11 to 1.1.12 in /web in the npm_and_yarn group across 1 directory (#43)
Dependabot couldn't find the original pull request head commit, 78de75ecc8dc508033f7ddac172c57e3b83c7abb.

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-04 16:30:41 -08:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
eac2224c32 build(deps-dev): bump js-yaml from 4.1.0 to 4.1.1 in /web in the npm_and_yarn group across 1 directory (#42)
Dependabot couldn't find the original pull request head commit, da59511e89b8ff34933ff9acba1459ca6173e94d.

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-04 16:30:21 -08:00
Jatin K MalikandGitHub 071b7b5da3 perf: optimize PageSpeed Insights performance score (#105) (#106)
This commit implements comprehensive performance optimizations to improve
the PageSpeed Insights score from 70/100 to targeting 90+.

## Images & Assets (Est. 200+ KiB savings)
- Optimize vocalinux.png: 207KB → 44KB (79% reduction)
- Add WebP versions for all logo sizes (32, 64, 96, 192, 512px)
- Create og-image.webp: 274KB → 176KB (36% reduction)
- All WebP images provide ~92% size reduction over PNG

## JavaScript Optimization (Est. 84 KiB savings)
- Lazy load react-syntax-highlighter with next/dynamic
- Created CodeBlock component for async code highlighting
- Reduces initial bundle size by deferring heavy syntax highlighter

## Bundle Configuration
- Disable production source maps (reduces bundle size)
- Add .browserslistrc targeting modern browsers (est. 12 KiB savings)
- Remove legacy browser polyfills (IE11, old Android, etc.)

## Critical Rendering Path (Est. 300ms LCP improvement)
- Add preconnect hint for api.github.com
- Defer Google Analytics to lazyOnload strategy

## Caching Strategy
- Add cache headers configuration for static assets
- Cache-Control: public, max-age=31536000, immutable
- Applied to _next/static/* and image assets

## Accessibility Fixes
- Fix footer color contrast: text-zinc-500 → text-zinc-400
- Add prefers-reduced-motion media query support
- All animations respect user motion preferences

## Expected Impact
- Total estimated LCP reduction: ~1.5-2 seconds
- Bundle size reduction: ~100 KB
- Targeting 90+ performance score (up from 70)
2026-01-30 22:47:59 -08:00
Ibi KellerandGitHub 4219e3e398 fix: Typo in gir1.2-ayatanaappindicator3-0.1 .deb package (Debian 13) (#101)
There was a typo in the gir1.2-ayatanaappindicator3-0.1 .deb package referred
to in apt commands, submitted in commit 27ebbfe417f178eaabcf2ac10af63f37bc819fac
gir1.2-ayatana-appindicator3 (typo) replaced with gir1.2-ayatanaappindicator3-0.1
per Debian package list at
https://packages.debian.org/search?keywords=gir1.2-ayatanaappindicator3-0.1
Will be backwards compatible with Debian 11 (bullseye), 12 (bookworm), and current
13 (trixie).

Changes:
- install.sh: gir1.2-ayatana-appindicator3 (typo) replaced with gir1.2-ayatanaappindicator3-0.1
- docs/INSTALL.md: gir1.2-ayatana-appindicator3 (typo) replaced with gir1.2-ayatanaappindicator3-0.1
- src/vocalinux/main.py: gir1.2-ayatana-appindicator3 (typo) replaced with gir1.2-ayatanaappindicator3-0.1
- CONTRIBUTING.md: gir1.2-ayatana-appindicator3 (typo) replaced with gir1.2-ayatanaappindicator3-0.1
2026-01-29 10:43:11 -08:00
Jatin K MalikandGitHub 97aec35287 feat: improve SEO with favicons, optimized OG image, and enhanced schema (#99)
* feat: improve SEO with favicons, optimized OG image, and enhanced schema

- Add favicon PNG assets (16x16, 32x32, 96x96) for better browser/Search display
- Add apple-touch-icon (180x180) for iOS devices
- Add PWA icons (192x192, 512x512) with maskable support
- Optimize OG image from 6.8MB to 279KB (1200x630px)
- Update web manifest with correct icons and theme color (#3CB371)
- Enhance JSON-LD with Organization and WebSite schemas
- Remove hardcoded version from SoftwareApplication schema
- Update sitemap lastmod to 2026-01-29 and changefreq to monthly

* fix: add back softwareVersion for CI sync

* feat: regenerate favicons with high-res transparent image

* feat: replace vocalinux.svg with vocalinux.png in web
2026-01-29 01:16:53 -08:00
Jatin K MalikandGitHub 1244acdb71 fix: improve wtype error reporting with stderr output (#98)
* fix: improve wtype error reporting with stderr output

When wtype fails on Wayland systems, the error message didn't include
the stderr output from the command, making debugging difficult. This
change captures and logs stderr to help users understand why text
injection is failing.

Related to #97

* style: apply black formatting
2026-01-29 00:46:59 -08:00
jatinkrmalik 0e6f4ceccc fix: update website header version to v0.4.1 Alpha 2026-01-29 00:31:19 -08:00
jatinkrmalik 460378ae0c chore: bump version to v0.4.1-alpha
Release preparation for v0.4.1-alpha with the following updates:

Features:
- Language selector UI with 10 languages and auto-detection support

Bug Fixes:
- App drawer launch fix when installing from local repo (absolute path for VENV_DIR)
- Escape commit message in Detect Changes step
- Correct git fetch syntax for tag-based updates

Updated Files:
- src/vocalinux/version.py: 0.4.0-alpha → 0.4.1-alpha
- install.sh: Default tag v0.3.0-alpha → v0.4.1-alpha
- README.md: Install command version updates
- docs/INSTALL.md: Install command version updates
- docs/UPDATE.md: New v0.4.1-alpha section, moved v0.4.0-alpha to Previous Versions
- web/src/app/layout.tsx: Software version update
2026-01-29 00:13:34 -08:00
Jatin K MalikandGitHub 60f88a2c40 fix: ensure VENV_DIR is absolute path in local install (#96)
When installing from within the git repository, VENV_DIR remained as
the relative path "venv", which caused wrapper scripts in ~/.local/bin/
to fail when executed from any directory other than the repo root.

This broke launching from app drawers/desktop entries since they don't
set the working directory to the repo location.

Fix: Convert VENV_DIR to an absolute path ($INSTALL_DIR/$VENV_DIR) when
running from local repository, ensuring wrapper scripts work regardless
of current working directory.
2026-01-29 00:04:23 -08:00
Jatin K MalikandGitHub 44634bb529 fix: escape commit message in Detect Changes step (#90)
The commit message was being directly inserted into the bash comparison,
which broke when the message contained special characters like parentheses.

Fix by assigning to a variable first before the comparison.
2026-01-28 23:27:42 -08:00
ad84fd882a feat: add language selector UI with auto-detection support (#87)
* feat: add language selector UI with auto-detection support

This commit implements a comprehensive language selector for the GUI,
extending support from 4 to 10 languages and adding Whisper auto-detect.

Changes:
- Add SUPPORTED_LANGUAGES constant with 10 languages (auto, en-us, hi, es, fr, de, it, pt, ru, zh)
- Each language includes display name, Whisper code, VOSK model name, and optional warning
- Extend VOSK_MODEL_INFO to include Hindi, Spanish, Italian, Portuguese, and Chinese models
- Add language dropdown in Settings dialog with status indicators (✓ downloaded, ↓ needs download, ⚠ warning)
- Add language warning label for auto-detect and engine compatibility messages
- Update default language from "en-us" to "auto" for Whisper auto-detection
- Handle "auto" language in Whisper (passes None for auto-detect)
- Handle "auto" language in VOSK (falls back to "en-us" since VOSK doesn't support auto-detect)
- Update CLI --language argument to include all supported languages

Fixes the issue where Hindi speech was being transcribed as English
because the language was hardcoded to "en-us" which Whisper interpreted
as "force English transcription" rather than auto-detect.

Related PRs:
- #72 - Feature: Add language auto-detection and GUI selector (supersedes)
- #71 - Feature: Add multi-language support for FR, DE, RU (builds upon)
- #52 - Feature: 3 more languages for Whisper and VOSK (extends)
- #68 - Comment out language parameter in transcribe call (addresses)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* style: format main.py with black

* fix: use venv python and set GI_TYPELIB_PATH for verification

* fix: create wrapper scripts that set GI_TYPELIB_PATH

Problem: The symlinks in ~/.local/bin pointed to venv scripts that
failed because PyGObject couldn't find the system typelib files
(AppIndicator3 namespace not available).

Solution: Create wrapper scripts in ~/.local/bin that:
1. Set GI_TYPELIB_PATH=/usr/lib/girepository-1.0
2. Execute the venv's vocalinux scripts

This fixes the issue where vocalinux-gui would fail to start with:
ValueError: Namespace AppIndicator3 not available

* fix: set GI_TYPELIB_PATH in desktop entry Exec line

When launching from the app drawer, the environment variables from the
wrapper script weren't being inherited properly. By adding GI_TYPELIB_PATH
directly in the desktop entry's Exec line, the app can now find the
AppIndicator3 typelib files.

* fix: always create wrapper scripts, not just for remote installs

The wrapper scripts were only created when CLEANUP_ON_EXIT=yes, which
is only set for remote (curl-based) installations. When running from
a local repository, the wrapper scripts were never created, causing
the desktop entry and launch commands to fail.

* fix: prevent recursion in LoggingHandler when processing log records

The custom LoggingHandler was triggering logging from within the logging
system itself, causing infinite recursion when formatting log records.
This could happen when the logging formatter or any operation during
record processing triggered additional log messages.

Fix: Add _emitting flag to prevent recursive calls to emit().

* fix: prevent infinite loop in settings dialog when changing language

Add guard flags to prevent recursive event handler calls:
- _populating_models: blocks _on_model_changed during model population
- _processing_language_change: blocks recursive language change handling
- _applying_settings: blocks recursive settings application

These guards prevent the infinite loop that occurred when selecting a
language whose VOSK model wasn't downloaded yet.

Fixes issue where "Model small needs download" logged repeatedly.

* fix: handle language parameter in reconfigure and improve UX

- Fix reconfigure() to properly handle language parameter changes
- Remove _processing_language_change check from _auto_apply_settings
  to allow settings to be applied when language changes
- Hide unsupported languages in dropdown based on selected engine
  * VOSK: only show languages with available models (no "auto")
  * Whisper: show all supported languages including "auto"
- Remove duplicate _auto_apply_settings call in _on_engine_changed
- Set active language in combo after repopulating options

This fixes:
1. Whisper continuing to use old language after switching (e.g.,
   still transcribing in Hindi after switching to en-us)
2. Potential infinite loop when selecting languages for VOSK
3. User confusion by showing incompatible language options

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 23:16:06 -08:00
Jatin K MalikandGitHub 6a1bf7513a fix: update website version to 0.4.0-alpha (#86)
The website was displaying an outdated version (0.3.0-alpha) instead of
the current version (0.4.0-alpha) from src/vocalinux/version.py.

Updated version references in:
- web/src/app/page.tsx (header badge)
- web/src/app/layout.tsx (structured data)
2026-01-28 20:27:47 -08:00
Jatin K MalikandGitHub d8cb0d325e fix: correct git fetch syntax for tag-based updates (#85) 2026-01-28 20:14:16 -08:00
Jatin K MalikandGitHub 7d56cc7bb3 ci: always deploy website on version changes and releases (#84)
The website displays the software version from source code in its
JSON-LD structured data. Previously, when version bumps occurred
(changing only src/vocalinux/version.py), the website was not rebuilt
or deployed because the path filter only detected 'python' changes,
not 'web' changes.

Changes:
- unified-pipeline.yml: Deploy website when either web OR python files
  change (for version updates)
- unified-pipeline.yml: Add version sync step to copy version from
  src/vocalinux/version.py to web/src/app/layout.tsx during build
- release.yml: Always deploy website as part of release workflow

This ensures the website's displayed version stays in sync with the
actual package version.
2026-01-28 20:13:15 -08:00
Jatin K MalikandGitHub 5e4f781254 docs: add UPDATE guide and bump version references to v0.4.0-alpha (#83) 2026-01-28 20:10:12 -08:00
Jatin K MalikandGitHub 924c5a2861 chore: bump version to 0.4.0-alpha (#82) 2026-01-28 20:03:59 -08:00
68cb35f5b3 Fix: Handle deprecated appindicator package on Debian 13+ (#70)
* Fix: Handle deprecated appindicator package on Debian 13+

Fixes #69

The gir1.2-appindicator3-0.1 package was deprecated in Debian 13 (trixie)
and replaced with gir1.2-ayatana-appindicator3. This change adds fallback
logic to try the new package if the old one is not available.

Changes:
- install.sh: Try old package first, fall back to ayatana-appindicator
- docs/INSTALL.md: Document both package options
- src/vocalinux/main.py: Update error message with Debian 13+ note
- CONTRIBUTING.md: Update dev setup instructions

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix: clean up whitespace in filtered package list

---------

Co-authored-by: Claude Opus <noreply@anthropic.com>
2026-01-28 19:56:52 -08:00
Jatin K MalikandGitHub 8a84b2c97f fix: remove --system-site-packages to avoid Python 3.12+ conflicts (#79)
Fixes #66

The --system-site-packages flag causes the virtual environment to inherit
system packages, which can include versions incompatible with newer Python
versions. On Arch/EndeavourOS with Python 3.12, an old coverage package
from the system causes Whisper to fail with:

    module 'coverage.types' has no attribute 'Tracer'

By creating an isolated virtual environment, all dependencies are installed
at compatible versions within the venv, avoiding such conflicts.
2026-01-28 19:54:11 -08:00
Jatin K MalikandGitHub 9bae706bbd fix: download install.sh from main to get --tag support (#78)
The v0.3.0-alpha release was created before the --tag feature was
added to install.sh, so installing from that tag fails with "Unknown
option: --tag=v0.3.0-alpha".

Solution: Always download install.sh from main (which has --tag support)
and pass the release tag as a parameter. This ensures users get a working
installer that can install the specific stable release.

Changes:
- web/src/app/page.tsx: Download from main instead of ${latestRelease}
- README.md: Update install commands to download from main
- docs/INSTALL.md: Update install command
- .github/workflows/release.yml: Update release notes
2026-01-28 19:36:06 -08:00
Jatin K MalikandGitHub 653007618b docs: Clarify VOSK and Whisper dependency installation in README (#67) (#76)
* docs: Clarify VOSK and Whisper dependency installation in README (#67)

- VOSK: installs the vosk Python package from PyPI
- Whisper: installs openai-whisper package from PyPI, which also pulls in PyTorch

Closes #67

* chore: Add Claude workflow rules to gitignore
2026-01-27 23:38:29 -08:00
4d8f029c8f fix: Install script now uses release tag instead of main branch (#75)
Problem: Even though the website fetched install.sh from a specific release tag,
the script itself would clone the repository from main branch, installing
potentially unstable/untested code.

Solution:
- Add --tag parameter to install.sh to specify which release to install
- Default to v0.3.0-alpha (latest stable) instead of main
- Clone the specific tag using 'git clone --branch <tag>'
- Update website to pass --tag parameter with fetched release

Changes:
- install.sh: Add --tag parameter, default to v0.3.0-alpha, clone specific tag
- web/src/app/page.tsx: Pass --tag=<version> to install script

This ensures users install the exact release version they intended, not
whatever code is currently on main branch.

Co-authored-by: Claude Opus <noreply@anthropic.com>
2026-01-26 01:02:46 -08:00
dff07ac960 Fix: Use latest release tag for install commands (#74)
* fix: Use latest release tag for install commands instead of main branch

The web install commands previously pointed to install.sh from the main branch,
which could be unstable/untested code. Now they dynamically fetch the latest
release tag from GitHub API and use that for the install script URLs.

Changes:
- Add getInstallCommands() function that takes a release tag
- Add latestRelease state that fetches from GitHub releases API
- Update all install commands to use the fetched release tag
- Fallback to 'main' if GitHub API fails

* docs: Update README and docs to use latest release tag

Also update GitHub release workflow to use the release tag dynamically.

Changes:
- README.md: Update install commands to use v0.3.0-alpha tag
- docs/INSTALL.md: Update install command to use v0.3.0-alpha tag
- .github/workflows/release.yml: Use ${{ github.ref_name }} for install URL
- Add note pointing to GitHub Releases for latest version

---------

Co-authored-by: Claude Opus <noreply@anthropic.com>
2026-01-26 00:45:34 -08:00
Jatin K MalikandGitHub 0c2d269a20 Fix: Test failures after language support merge (#73)
* fix: Update tests to include language parameter

- Add language to parse_arguments tests
- Update mock expectations for SpeechRecognitionManager to include language
- Fixes test failures after language support merge

* fix: Update tests for language support and fix None argument handling

- Fix test_parse_arguments_defaults to expect None for model/engine/language
- Add language_combo mock to settings_dialog tests
- Add language attribute to dialog mock setup
- Include language in get_selected_settings mock return values
- Update mock_config_manager to include language in return value
2026-01-26 00:11:38 -08:00
jatinkrmalik ef0b7e274c fix: Correct import order in recognition_manager.py
Move vosk_model_info import before command_processor import
to satisfy isort black profile ordering rules.
2026-01-26 07:54:23 +00:00
jatinkrmalik f7fcff7072 fix: Correct f-string quote syntax in recognition_manager
Fix E999 SyntaxError caused by nested double quotes in f-strings.
Changed outer quotes to single quotes to allow double quotes inside.
2026-01-26 07:52:49 +00:00
1172a0e54b Feature: Add multi-language support for FR, DE, RU
Add support for French, German, and Russian languages in both VOSK and Whisper engines.

- Adds language configuration to config system
- Adds --language command-line argument
- Creates vosk_model_info.py utility for model mapping
- Supports en-us, fr, de, ru languages
- Merged with latest main including PR #70 (Debian 13+ appindicator fix)

Co-Authored-by: Artem Lytvynov <violog@users.noreply.github.com>
2026-01-25 23:39:45 -08:00
jatinkrmalik b5534e74c1 chore: bump version to 0.3.0-alpha for new release 2026-01-20 19:41:29 -08:00
Jatin K MalikandGitHub eec0182644 fix: persist model selection per-engine when switching between VOSK and Whisper (#64)
- Add vosk_model_size and whisper_model_size to config to track model
  selection independently for each engine
- Update config manager with get_model_size_for_engine() and
  set_model_size_for_engine() methods for per-engine model tracking
- Add automatic migration for existing configs without per-engine model sizes
- Update settings dialog to use engine-specific model sizes when populating
  model options
- Update install.sh to include new per-engine model fields in default config
- Fix: Previously, switching from VOSK to Whisper would incorrectly try to
  download the recommended model instead of the previously used model

Fixes the issue where switching back to Whisper after using VOSK would
start downloading the medium model instead of remembering the tiny model
that was configured during installation.
2026-01-20 19:35:16 -08:00
Jatin K MalikandGitHub 7a6d0d4e2b 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)
2026-01-20 19:19:09 -08:00
jatinkrmalik d31dab6fd2 chore: update copyright year to 2026 2026-01-20 00:00:28 -08:00
jatinkrmalik bdf09d79e1 Add full GPLv3 license text 2026-01-19 23:52:46 -08:00
Jatin K MalikandGitHub b5e1d61d17 Fix: Audio detection issues - Add device selection and testing (#55)
* Fix audio detection issues (#34)

This commit addresses the audio detection issues reported in GitHub issue #34
where users on various Linux distributions (Fedora, Ubuntu with Wayland)
were unable to get voice recognition working despite their microphones
functioning in other applications.

Changes:
- Add audio input device enumeration and selection
  - New get_audio_input_devices() function lists all available input devices
  - Users can now select which microphone to use in Settings

- Add audio diagnostics and testing
  - New test_audio_input() function for testing microphone input
  - Test Mic button in Settings to verify audio is being captured
  - Audio level bar shows real-time input levels

- Improve audio debugging/logging
  - Log available audio devices on startup
  - Log which device is being used
  - Periodic audio level logging during recording
  - Warning when no speech detected and max level is very low
  - Log when speech is first detected with threshold info

- Add audio device configuration
  - Audio device selection persisted to config file
  - Device loaded on startup from saved config

- Better error handling
  - Graceful handling of audio stream open failures
  - Clear error messages when audio devices are unavailable

The root cause for many users was that PyAudio's default device selection
may not match the system's default input, especially on systems using
PipeWire or complex audio routing. Users can now explicitly select their
microphone and test it before using voice recognition.

* Fix circular import in speech_recognition module

Move lazy imports for get_audio_input_devices and test_audio_input
to avoid circular dependency when settings_dialog imports from
speech_recognition at module load time.

* Fix audio detection issues with device selection

- Add audio device enumeration and selection in Settings
- Add microphone test button with audio level indicator
- Improve VAD logging with periodic audio level output
- Add warning when no speech detected with low audio levels
- Store audio device preference in config

Fixes #34

* Fix linting issues - remove unused imports, fix module-level imports, format code

* Fix remaining linting issues - add type hints back, fix whitespace, add noqa comments

* Fix final linting issue - break long line in config_manager

* Fix formatting - use black formatting, align flake8 line-length with black (100)

* Fix CI test failures: Update mocks and assertions

* Fix audio feedback mock tests for CI

- Move audio feedback imports to top of recognition_manager.py (remove lazy imports)
- Add shared mock_audio_feedback in conftest.py for consistent mocking across tests
- Update test_recognition_manager.py and test_speech_recognition.py to use shared mock
- Fixes test_start_stop_recognition, test_start_recognition, test_stop_recognition
2026-01-19 23:49:39 -08:00
jatinkrmalik e5263b2078 Fix web build/deploy triggers using paths-filter [web] 2026-01-19 23:42:37 -08:00
Jatin K MalikandGitHub 35c091f09b Add Google Analytics tracking to website (#61)
* Add Google Analytics tracking to website

- Add GA script tags to layout.tsx head section
- Remove @next/third-parties dependency from package.json
- Use measurement ID G-7NBBNJNNQ7 for tracking

* Fix Google Analytics integration for static export

- Use Next.js Script component instead of inline scripts
- Add 'afterInteractive' strategy for optimal loading
- GA scripts now properly included in static build output
2026-01-19 23:38:44 -08:00
Jatin K MalikandGitHub 7426055336 Fix: Prevent horizontal scrolling on mobile for code blocks (#59)
* Fix: Prevent horizontal scrolling on mobile for code blocks [web]

- Wrap SyntaxHighlighter components in overflow-x-auto containers
- Add customStyle prop with maxWidth and overflowX for proper mobile handling
- Add min-w-0 to parent cards to prevent grid overflow
- Wrap uninstall command pre tag in overflow container
- Ensures code blocks scroll within their containers on mobile devices

* Style: Match uninstall command box with install sections [web]

- Use SyntaxHighlighter for uninstall command (consistent with install sections)
- Add red icon background to distinguish from install commands
- Add descriptive subtitle 'Clean removal in one command'
- Extract uninstallCommand as constant like install commands
- Maintain responsive overflow handling for mobile
2026-01-19 23:21:38 -08:00
jatinkrmalik 5ca1a1cbf7 Fix: Use Next.js Link component for internal navigation [web]
- Replace <a href='/'> with <Link href='/'> in header logo
- Replace <a href='/'> with <Link href='/'> in footer logo
- Fixes ESLint no-html-link-for-pages errors
2026-01-19 17:44:53 -08:00
jatinkrmalik b869c13ff5 Fix CI: Simplify deploy-website condition [web]
Deploy website whenever web-build succeeds on main branch.
The web-build job already has the conditional logic for when to build.
2026-01-19 17:43:38 -08:00
jatinkrmalik 13618878b5 Merge branch 'feature/website-beta-v2' 2026-01-19 17:37:34 -08:00
jatinkrmalik 9afc3d4717 Fix CI: Auto-detect web/ changes for website build & deploy [web]
- Build website when files in web/ directory are modified
- Deploy website on workflow_dispatch without requiring [web] tag
- Keep backward compatibility with [web] commit message trigger
2026-01-19 17:37:28 -08:00
Jatin K MalikandGitHub 99b6fb6062 Website Beta v2: UI Polish and Improvements (#56)
* feat(web): Complete website overhaul for beta release

Major updates to make the website beta-ready:

## Content & Design
- Completely rewritten homepage with modern, catchy design
- Prominent one-click installation command in hero section
- Clear value proposition: 'Voice Dictation for Linux, Finally Done Right'
- Trust indicators (100% Offline, Privacy First, Open Source, X11/Wayland)
- Interactive demo section encouraging users to try double-tap Ctrl
- Feature cards highlighting key benefits
- Detailed installation section with both full and quick install options
- Voice commands reference section
- Speech engines comparison (Whisper AI vs VOSK)
- Comprehensive FAQ section
- Modern CTA section and footer

## SEO Improvements
- Added comprehensive meta tags with proper descriptions
- Open Graph and Twitter Card meta tags with proper images
- JSON-LD structured data for SoftwareApplication schema
- Added robots.txt for search engine crawling
- Added sitemap.xml for better indexing
- Added site.webmanifest for PWA support
- Proper canonical URL and meta keywords
- Author attribution and GPL-3.0 license info

## Technical
- Removed unused creatr-devtools dependency
- Real GitHub stars fetching from API
- Improved responsive design
- Better accessibility with proper aria labels
- Clean, maintainable component structure

The website now properly reflects the v0.2.0-alpha release features
and provides a clear path for users to install and use Vocalinux.

* feat(web): Add live demo, improve logo and install UX

Changes:
- Use actual app logo SVG image for consistent branding
- Added live browser-based speech recognition demo using Web Speech API
  - Allows users to try voice-to-text directly in their browser
  - Clear indication that the demo uses cloud-based Web Speech API
  - Prominent call-to-action to install Vocalinux for offline experience
- Redesigned one-click install box with better visual hierarchy
  - Left-aligned layout with clear instructions
  - Terminal-style command display with copy button
  - Added compatibility info and install time estimates
- Improved footer and feature section with consistent logo usage

* feat(web): Add double-tap Ctrl to trigger live demo

- Added keyboard detection for double-tap Ctrl (same as the real app)
- Shows visual hint 'Tap Ctrl again to start!' on first Ctrl press
- Instructions updated to highlight Ctrl+Ctrl as primary activation
- Click still works as alternative method
- Double-tap Ctrl also stops recording when active

* fix(web): Remove duplicate DictationOverlay that conflicted with LiveDemo

The old DictationOverlay was still responding to double-tap Ctrl alongside
the new LiveDemo component, causing two overlays to appear simultaneously.
Removed the page-level useDoublePress hook and DictationOverlay since the
LiveDemo now handles double-tap Ctrl detection internally.

* fix(web): Improve Quick Install section layout and readability

- Changed to stacked vertical layout for cleaner appearance
- Command now wraps with break-all instead of horizontal scroll
- Simplified compatibility text to fit better
- Better spacing and padding throughout
- Responsive bottom info section

* fix(web): Make Quick Install box wider for better text fit

Changed max-w-4xl to max-w-5xl and added horizontal padding so the
curl command doesn't wrap as much on medium-sized screens.

* Website beta v2: UI polish and improvements

- Reorder nav links to match page section order (Demo, Features, Install)
- Split install commands into 3 lines for better readability
- Fix button contrast in dark mode (Install Now, Install Vocalinux)
- Improve live demo mic icon and Ctrl text readability
- Add gradient/border styling to version tag in header
- Hide scrollbars on code blocks globally
- Add favicon using vocalinux.svg
- Add copy button to uninstall command
- Left-align Quick Install header text
- Update footer author link to X/Twitter profile
2026-01-19 17:34:24 -08:00
jatinkrmalik e4996a0d1d Website beta v2: UI polish and improvements
- Reorder nav links to match page section order (Demo, Features, Install)
- Split install commands into 3 lines for better readability
- Fix button contrast in dark mode (Install Now, Install Vocalinux)
- Improve live demo mic icon and Ctrl text readability
- Add gradient/border styling to version tag in header
- Hide scrollbars on code blocks globally
- Add favicon using vocalinux.svg
- Add copy button to uninstall command
- Left-align Quick Install header text
- Update footer author link to X/Twitter profile
2026-01-19 17:29:05 -08:00
jatinkrmalik c321f8a2a3 fix(web): Make Quick Install box wider for better text fit
Changed max-w-4xl to max-w-5xl and added horizontal padding so the
curl command doesn't wrap as much on medium-sized screens.
2026-01-19 17:00:45 -08:00
jatinkrmalik f89f2455fc fix(web): Improve Quick Install section layout and readability
- Changed to stacked vertical layout for cleaner appearance
- Command now wraps with break-all instead of horizontal scroll
- Simplified compatibility text to fit better
- Better spacing and padding throughout
- Responsive bottom info section
2026-01-19 16:57:43 -08:00
jatinkrmalik 162824e6f1 fix(web): Remove duplicate DictationOverlay that conflicted with LiveDemo
The old DictationOverlay was still responding to double-tap Ctrl alongside
the new LiveDemo component, causing two overlays to appear simultaneously.
Removed the page-level useDoublePress hook and DictationOverlay since the
LiveDemo now handles double-tap Ctrl detection internally.
2026-01-19 16:54:45 -08:00
jatinkrmalik d57bc82bc3 feat(web): Add double-tap Ctrl to trigger live demo
- Added keyboard detection for double-tap Ctrl (same as the real app)
- Shows visual hint 'Tap Ctrl again to start!' on first Ctrl press
- Instructions updated to highlight Ctrl+Ctrl as primary activation
- Click still works as alternative method
- Double-tap Ctrl also stops recording when active
2026-01-19 16:52:10 -08:00