Skip to content

Add local Whisper setup and harden Electron startup#12

Open
richtobey wants to merge 1 commit intoTechyCSR:mainfrom
richtobey:fix/local-whisper-and-electron-startup
Open

Add local Whisper setup and harden Electron startup#12
richtobey wants to merge 1 commit intoTechyCSR:mainfrom
richtobey:fix/local-whisper-and-electron-startup

Conversation

@richtobey
Copy link
Copy Markdown

Summary

This PR bundles the current working-tree improvements around speech setup, Electron startup reliability, and renderer/network hardening.

What Changed

  • added a repo-local OpenAI Whisper setup flow in setup.sh
  • added scripts/test-speech.js and updated the npm speech smoke-test script path
  • expanded speech configuration across .env, env.example, README.md, and runtime config to support both Azure Speech and local Whisper
  • updated src/services/speech.service.js to support provider selection, local Whisper transcription, runtime speech settings, and availability/status reporting
  • expanded the settings UI to configure speech provider, Whisper command/model/language/segment settings, and provider-specific field enablement
  • updated .gitignore for local Whisper artifacts and log files
  • hardened Electron startup by clearing ELECTRON_RUN_AS_NODE in npm start/dev, simplifying preload quit behavior, and enforcing a single-instance lock
  • updated the app to focus the existing instance when a second launch is attempted
  • reduced Chromium/renderer fragility by replacing CDN-backed Prism/Font Awesome usage with local assets, switching the response window to bundled markdown fallback behavior, and disabling unnecessary background browser networking

Why

  • local Whisper setup was incomplete and required too much manual wiring
  • repeated launches could spawn duplicate Electron app instances instead of reusing the existing one
  • the response window and hidden renderer windows depended on remote CDN assets, which was causing brittle renderer behavior and noisy SSL certificate spam in the terminal

Verification

  • node --check main.js
  • manually launched the app with npm start
  • verified clean startup logging after the networking/UI hardening changes
  • verified second launch triggers the existing instance path via the Second instance launch detected; focusing existing windows log message
  • verified the app can be stopped cleanly after testing

Notes

  • the branch is pushed from the fork richtobey/OpenCluely
  • this PR includes the broader speech/setup/settings changes that were already present in the current worktree, in addition to the Electron startup and SSL-noise fixes

Expand speech support to include a repo-local OpenAI Whisper workflow alongside Azure Speech. This updates setup, configuration, settings UI, and runtime speech handling so the app can bootstrap and use a local Whisper CLI with sane defaults and a smoke-test script.

Also harden Electron startup and renderer behavior by clearing ELECTRON_RUN_AS_NODE during npm start/dev, enforcing a single-instance lock, simplifying preload quit behavior, and replacing fragile CDN-backed UI assets with local resources or guarded fallbacks to reduce renderer crashes and background SSL noise.

Documentation and examples are updated to match the new speech setup flow, environment variables, and startup behavior.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants