Commit Graph
86 Commits
Author SHA1 Message Date
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
jatinkrmalik 612e6811ed 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
2026-01-19 16:47:34 -08:00
jatinkrmalik 02c3a21931 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.
2026-01-19 16:35:46 -08:00
Jatin K MalikandGitHub 2dcf0ef17c feat: Enable automated PyPI publishing on release (#46)
- Added publish-pypi job to release workflow
- Builds, verifies, and uploads package to PyPI after GitHub release
- Uses PYPI_API_TOKEN secret for authentication
- Added id-token permission for trusted publishing support
- Package verification with twine check before upload
2025-12-29 21:56:18 -08:00
jatinkrmalik 98e9c10c75 Update README.md 2025-12-28 21:43:57 -08:00
Jatin K MalikandGitHub f8e5de5621 feat: Make Whisper tiny the default engine and download during install (#45)
* feat: Make Whisper tiny the default engine and download during install

- Changed default engine from 'vosk' to 'whisper' in config_manager.py
- Changed default model_size from 'small' to 'tiny' in config_manager.py
- Added install_whisper_model() function to install.sh that downloads
  the Whisper tiny model (~75MB) during installation
- Whisper model is downloaded when Whisper package is installed
  (in non-interactive mode or with --with-whisper flag)
- Updated installation summary to show Whisper model status
- Updated documentation (README.md, INSTALL.md, SECURITY.md, USER_GUIDE.md)
  to reflect Whisper tiny as the default engine

This provides a better out-of-box experience: users can install and
immediately use Vocalinux without any additional downloads or prompts.

* test: Update test to reflect whisper as default engine
2025-12-28 20:31:29 -08:00
jatinkrmalik b9455390ec docs: update all markdown files for new install flow
- INSTALL.md: Add curl install as recommended, add --no-whisper flag
- CONTRIBUTING.md: Fix activation instructions for source installs
- README.md: Fix development setup to use venv/bin/activate

All docs now reflect:
- curl | bash installs Whisper by default
- --no-whisper for faster VOSK-only install
- Correct venv activation paths
2025-12-28 16:54:26 -08:00
Jatin K MalikandGitHub 8b9dcb2586 fix: Install/uninstall scripts for curl | bash usage (#41)
* fix: install/uninstall scripts for curl | bash usage

Install script improvements:
- Detect non-interactive mode (curl | bash) automatically
- Skip interactive prompts in non-interactive mode
- Add --no-whisper and -y/--yes flags for explicit control
- Continue with defaults when stdin is not a tty

Uninstall script improvements:
- Clean up curl-installed files:
  - ~/.local/share/vocalinux-install (cloned repo)
  - ~/.local/share/vocalinux/venv (virtual environment)
  - ~/.local/bin/vocalinux (symlink)
  - ~/.local/bin/activate-vocalinux.sh
- Add -y/--yes flag for non-interactive mode
- Verify all curl-installed components are removed

README updates:
- Document curl installation with --with-whisper option
- Add uninstall instructions for both methods
- Clarify what gets installed where

* feat: install Whisper by default in non-interactive mode

- curl | bash now installs both VOSK and Whisper out of the box
- Users can freely switch between engines in settings
- Add --no-whisper flag for faster install (VOSK only)
- Update README to reflect new default behavior

* chore: remove install-whisper.sh (now part of install.sh)

Whisper is installed by default via install.sh, making this
separate script redundant.

* chore: remove activate-vocalinux.sh (generated by install.sh)

This file is dynamically created by install.sh based on the
venv location, so the static template is not needed.
2025-12-28 16:04:59 -08:00
jatinkrmalik dc40690ea9 fix: remove escaped backticks in README code blocks 2025-12-28 15:46:03 -08:00
Jatin K MalikandGitHub 652499a18d fix: install.sh now works with curl | bash (#40)
- Auto-clones repo when run remotely (via curl | bash)
- Installs venv to ~/.local/share/vocalinux/venv
- Creates symlink at ~/.local/bin/vocalinux
- Creates activation script at ~/.local/bin/activate-vocalinux.sh
- Updates README with new installation instructions

Fixes installation for users running:
curl -fsSL https://raw.githubusercontent.com/.../install.sh | bash
2025-12-28 15:43:15 -08:00
jatinkrmalik 0c0e65b732 fix: read version from file instead of importing (avoids gi dependency) 2025-12-28 15:32:23 -08:00
Jatin K MalikandGitHub 1dc1d44665 feat: Alpha Launch v0.2.0 - Complete UX Overhaul 🚀🎤 (#39)
* feat: prepare for v0.2.0-alpha release

* feat: prepare for v0.2.0-alpha release

* chore: remove CHANGELOG.md, use GitHub Releases instead

* refactor: use existing About dialog instead of Settings section

* style: enhance About dialog UI readability

* style: fix formatting with black and isort

* feat: show VAD and silence timeout settings for Whisper engine

- Renamed 'VOSK Settings' to 'Recognition Settings'
- VAD Sensitivity and Silence Timeout now apply to both engines
- Added tooltips explaining each setting
- VOSK-specific model info only shown when VOSK selected

* fix: resolve overlapping UI elements in settings dialog

* fix: save VAD and silence timeout settings for both engines

Previously these settings were only saved when VOSK was selected.
Now they persist correctly for Whisper as well.

* fix: show download progress when selecting undownloaded model

Previously when auto-applying settings, models would download silently
in the background without showing the progress dialog. Now:
- Download progress dialog appears for undownloaded models
- Model icons update correctly after download completes

* feat: add download progress, speed, ETA and cancel button

- Show real download progress percentage for VOSK models
- Display download speed (MB/s) and estimated time remaining
- Add Cancel button to abort downloads
- Update status during extraction phase
- Whisper downloads still pulse (uses internal downloader)

* fix: defer model download until needed, don't block startup

- App now starts instantly even if models aren't downloaded
- Models are downloaded on-demand when selected in Settings
- If user tries to dictate without a model, plays error sound
- Added model_ready property to check if engine is usable

* fix: improve first-run UX without downloaded models

- Settings dialog now defaults to smallest available model, not saved config
- Only show saved model if it's actually downloaded
- Add desktop notification when trying to dictate without a model
- Prevents auto-downloading large models on first launch

* feat: add download progress tracking for Whisper models

- Implement custom Whisper model download with progress/speed/ETA
- Uses OpenAI's CDN URLs directly instead of whisper.load_model()
- Progress callback works the same as VOSK downloads
- Supports cancellation during download

* fix: enable download progress callback for Whisper models

Progress callback was only being set for VOSK downloads, not Whisper.
Now both engines show real-time progress, speed, and ETA.

* fix: update tests for defer_download and config manager mocking

- test_main: Mock ConfigManager to prevent saved config from overriding test values
- test_settings_dialog: Mock ModelDownloadDialog to prevent GTK init errors
- test_speech_recognition: Use proper MockVoskModule class instead of MagicMock, pass defer_download=False for download test
- test_whisper_support: Pass defer_download=False to trigger model loading in test

* fix: resolve test failures for CI

- test_main: Fix ConfigManager patch path to use source module
- test_settings_dialog: Mock _is_vosk_model_downloaded and _is_whisper_model_downloaded to skip download flow, add missing dialog attributes
- test_speech_recognition: Replace recognizer with properly configured mock that returns valid JSON, fixing test isolation issues when running all tests together

* fix: mock _download_whisper_model in whisper test to avoid requests exception handling issue

* fix: add gir1.2-girepository-2.0 dep for PyGObject on Ubuntu 24.04

- Add missing girepository-2.0 package for newer Ubuntu runners
- Use --no-build-isolation for PyGObject to use system packages

* fix: skip PyGObject pip install, use system python3-gi package

- Use --no-deps for editable install to skip PyGObject
- Install other deps explicitly without PyGObject
- Add python3-gi-cairo for complete GTK support
- Removes problematic girepository-2.0 build requirement

* fix: install PyGObject via pip with proper build deps

- Remove python3-gi/python3-gi-cairo (doesn't work with setup-python)
- Install PyGObject from pip after installing build dependencies
- Simplify venv setup without --system-site-packages hack

* Fix GObject

* fix: set GI_TYPELIB_PATH for pip-installed PyGObject to find AppIndicator3
2025-12-28 15:29:51 -08:00
Jatin K MalikandGitHub 917510d3f4 feat: Enhance Whisper Support & Improve Settings UI (#38)
* feat: Implement comprehensive Whisper speech recognition support

🎯 Complete Whisper Implementation:
- Proper model size validation and mapping (small->base, medium->small, large->medium)
- GPU/CPU device detection and automatic model placement
- Efficient in-memory audio processing (no temporary files)
- Custom model cache directory for organized storage
- Enhanced error handling with detailed logging
- Optimized transcription parameters for better accuracy

🔧 Technical Improvements:
- Replace temporary file approach with direct tensor processing
- Add torch.no_grad() context for efficient inference
- Implement proper audio normalization and padding
- Add comprehensive error handling and recovery
- Support for both CPU and CUDA acceleration

📦 Installation Integration:
- Add --with-whisper flag to installation script
- Update setup.py with correct openai-whisper dependencies
- Include torch and torchaudio in whisper extras
- Automatic and manual installation options

🧪 Testing & Validation:
- Add comprehensive test suite for Whisper functionality
- Test model size mapping, initialization, and transcription
- Mock-based testing for environments without Whisper installed
- Integration with existing test infrastructure

💡 Performance Optimizations:
- Efficient audio buffer processing without file I/O
- GPU acceleration when available
- Optimized Whisper parameters for real-time usage
- Memory-efficient model loading and caching

🔄 Backward Compatibility:
- Maintains full compatibility with existing VOSK implementation
- Graceful fallback when Whisper dependencies are missing
- No breaking changes to existing API

This implementation provides a production-ready Whisper integration
that significantly improves transcription accuracy while maintaining
the performance characteristics needed for real-time voice dictation.

* feat: Add comprehensive Whisper installation support and error handling

🎯 Enhanced User Experience:
- Add intelligent Whisper import error detection in settings dialog
- Show helpful installation instructions when Whisper is missing
- Automatically revert to VOSK when Whisper selection fails
- Provide multiple installation methods and troubleshooting tips

📋 New Installation Helper:
- Create install-whisper.sh script for dedicated Whisper installation
- Support multiple installation methods (standard, trusted hosts, break-system-packages)
- Comprehensive error handling and fallback options
- Clear instructions for SSL issues and alternative approaches

🔧 Improved Error Handling:
- Detect Whisper import errors specifically in settings dialog
- Show user-friendly dialog with installation instructions
- Graceful fallback to VOSK when Whisper unavailable
- Detailed logging for troubleshooting

💡 User Guidance:
- Step-by-step installation instructions in error dialog
- Multiple installation options for different environments
- Clear explanation of disk space and time requirements
- Troubleshooting tips for common SSL issues

🛠️ Technical Features:
- Automatic virtual environment detection
- Installation verification and model listing
- SSL issue detection and workarounds
- Comprehensive error reporting and recovery

This addresses the immediate issue where users get cryptic errors
when trying to use Whisper without proper installation, providing
clear guidance and multiple solutions for different scenarios.

* feat: Enhance Whisper support and improve Settings UI

## Whisper Implementation Fixes
- Fix Whisper transcription by removing unnecessary audio padding
- Fix API usage: pass numpy array directly instead of torch tensor
- Remove confusing model size remapping (users select exact model names)
- Add fp16=False for CPU to prevent warnings
- Fix missing 'import torch' in install-whisper.sh verification

## Audio System Improvements
- Add ALSA error handler to suppress noisy warnings
- Process remaining audio buffer when stopping recognition (fixes test button)

## Settings Dialog UI Enhancements
- Add model metadata display (download status, size, recommendations)
- Show ✓ for downloaded models, ↓ for pending downloads, ★ for recommended
- Add system-based model recommendations (based on RAM/GPU)
- Implement auto-apply settings on change (remove Apply button)
- Fix VOSK settings visibility when Whisper is selected
- Add VOSK model info panel with same features as Whisper
- Fix test recognition to show results in dialog instead of injecting text
- Fix race condition in test result display

## Startup Improvements
- Load saved config on startup (engine/model now persists correctly)
- Settings are remembered between app restarts

## Code Quality
- Add get_text_callbacks/set_text_callbacks methods for test isolation
- Update tests with proper mocking
2025-12-28 13:06:51 -08:00
Jatin K MalikandGitHub 98cba5f549 feat: Package VOSK model with installation for faster first-run experience (#32)
* feat: Package VOSK model with installation for faster first-run experience

🚀 Installation Improvements:
- Add VOSK small model download during installation process
- Eliminate first-run model download delay for better user experience
- Add --skip-models option for offline installations
- Include wget, curl, unzip in system dependencies for model download

🔍 Model Management Enhancements:
- Add multi-location model search (user, system-wide, pre-installed)
- Prioritize pre-installed models over downloads
- Add informative logging for model source detection
- Create marker files to identify installer-provided models

📦 Installation Script Features:
- Robust model download with progress indicators
- Internet connectivity checking before download attempts
- Graceful fallback when download fails (runtime download)
- Comprehensive error handling and cleanup
- Installation summary includes model status

🔧 Recognition Manager Updates:
- Check multiple model locations in priority order:
  1. User's local models directory
  2. System-wide installation directories
  3. Download to user directory if not found
- Enhanced logging for model source identification
- Backward compatibility with existing installations

💡 Benefits:
- Faster application startup (no initial model download)
- Better offline installation support
- Reduced first-run friction for users
- Maintains fallback to runtime download if needed
- Clear feedback about model installation status

This addresses the issue where users had to wait for model downloads
on first application launch, making VocaLinux ready to use immediately
after installation.

* fix: Move install_vosk_models function definition before its call

The function was being called before it was defined, causing a
'command not found' error during installation. Fixed by moving
the function definition to before the installation steps where
it's called.

This resolves the installation error:
./install.sh: line 701: install_vosk_models: command not found
2025-06-23 18:05:29 -05:00
Jatin K MalikandGitHub d265607d40 feat: Add comprehensive logging system with UI for debugging text injection issues (#31)
* feat: Add comprehensive logging system with UI for debugging

🔍 New Logging Features:
- Add LoggingManager for centralized log capture and management
- Add LoggingDialog with real-time log viewing, filtering, and export
- Add 'View Logs' menu item to system tray for easy access
- Support log filtering by level (DEBUG, INFO, WARNING, ERROR, CRITICAL)
- Support log filtering by module name
- Export logs to text files with applied filters
- Auto-scroll functionality for real-time log monitoring
- Log statistics and management (clear logs, view counts)

🐛 Enhanced Text Injection Debugging:
- Add detailed logging for text injection process
- Log target window information (name, class, PID, process)
- Log injection chunks and retry attempts
- Add timeout handling with detailed error messages
- Log environment detection and tool selection
- Enhanced error reporting with stack traces

🎯 UI Improvements:
- Integrated logging dialog with GTK interface
- Color-coded log levels for easy identification
- Real-time log updates in the UI
- Export functionality with file chooser dialog
- Status bar showing log statistics
- Non-modal dialog for continuous monitoring

📁 New Files:
- src/vocalinux/ui/logging_manager.py - Core logging management
- src/vocalinux/ui/logging_dialog.py - GTK logging viewer dialog

This will help debug text injection issues in applications like TextEdit
and terminal where voice typing may not work as expected.

* fix: Improve logging dialog UI layout and add clipboard functionality

🎨 UI Layout Improvements:
- Increase dialog default size from 900x600 to 900x700
- Set minimum content height for scrolled window to 400px
- Enable vertical and horizontal expansion for text view and scrolled window
- Ensure log text area takes up most of the available dialog space

📋 Clipboard Functionality:
- Add 'Copy All' button to dialog for easy log sharing
- Implement clipboard copy with formatted headers and timestamps
- Add user feedback messages for successful/failed copy operations
- Include line count information in success messages
- Handle empty log cases gracefully

🔧 Technical Improvements:
- Proper GTK clipboard integration using Gdk.SELECTION_CLIPBOARD
- Error handling for clipboard operations
- Formatted clipboard content with metadata headers
- Thread-safe clipboard operations

This fixes the issue where the log text area was too short and users
could barely see 2 lines despite having plenty of vertical space available.
The new layout ensures the text view expands to fill the available space,
and the clipboard functionality makes it easy to share logs for debugging.
2025-06-23 17:44:47 -05:00
Jatin K MalikandGitHub f468be627d feat: comprehensive bug fixes and feature improvements (#30)
Major improvements and fixes:

🐛 Bug Fixes:
- Fix VOSK model download URL (v0.42 -> v0.22 for large model)
- Fix resource path resolution across different installation methods
- Fix missing error handling for audio library imports
- Fix text injection return value handling
- Fix test compatibility issues with updated imports

✨ New Features:
- Add centralized ResourceManager for consistent resource access
- Add ActionHandler for voice commands (delete, undo, redo, select, etc.)
- Add keyboard shortcut support for text injection
- Add comprehensive dependency checking with helpful error messages
- Add resource validation with detailed reporting

🔧 Improvements:
- Eliminate code duplication in resource path finding
- Enhance error handling with user-friendly messages
- Improve Wayland/X11 compatibility
- Add proper return type annotations
- Enhance test coverage and fix failing tests

📁 New Files:
- src/vocalinux/utils/resource_manager.py - Centralized resource management
- src/vocalinux/ui/action_handler.py - Voice command action processing
- src/vocalinux/utils/__init__.py - Utils package initialization

🧪 Testing:
- All tests now pass (76 passed, 28 skipped)
- Updated test mocks for new architecture
- Fixed import issues in test files

This makes VocaLinux production-ready with robust error handling,
complete feature implementation, and improved maintainability.
2025-06-23 17:26:03 -05:00
Jatin K MalikandGitHub 7a283169b8 Improve installation scripts with better platform detection, dependency management, and error handling (#29) 2025-06-23 15:02:51 -05:00