Skip to content

Separate WSR/Kaldi install dependency paths#18

Open
kendonB wants to merge 18 commits intomasterfrom
separate-installs-pr-20260224
Open

Separate WSR/Kaldi install dependency paths#18
kendonB wants to merge 18 commits intomasterfrom
separate-installs-pr-20260224

Conversation

@kendonB
Copy link
Copy Markdown
Owner

@kendonB kendonB commented Feb 24, 2026

Note

Medium Risk
Touches Windows install/launch scripts and dependency detection logic, which can break end-user setup flows if interpreter/venv resolution or wheel selection is wrong. Runtime behavior changes are mostly limited to which Python executable is used and optional UI dependencies (Qt).

Overview
Windows classic install flow is reworked around a repo-local uv virtualenv (.venv) using Python 3.12+. A new Install_Caster_WSR.bat is introduced, and Install_Caster_Kaldi.bat/Run_Caster_Kaldi.bat are rewritten to create/reuse .venv, install from requirements-windows-installer.txt, and launch dragonfly using .venv\Scripts\python.exe (with clearer error handling when the venv/interpreter is missing).

Kaldi install now has guided engine/model setup and better runtime configuration. The installer attempts to resolve and install the latest compatible kaldi-active-grammar GitHub wheel (with a guarded fallback to dragonfly2[kaldi]), optionally downloads/extracts a Kaldi model, and installs pronunciation dependencies; the runner adds env-based audio device selection via CASTER_KALDI_AUDIO_INPUT_DEVICE plus extra engine options via CASTER_KALDI_ENGINE_OPTIONS.

Qt/UI and compatibility handling are updated for Python 3.12+. Qt import errors now provide actionable guidance, installers prefer PySide6 on supported 64-bit Python (best-effort for DNS/WSR), and runtime launches for HUD/settings/HMC/grid tools switch to settings.runtime_hidden_console_binary().

Dependency and packaging housekeeping. requirements.txt no longer hard-requires Qt on Windows (marker-based), a new requirements-windows-installer.txt is packaged via MANIFEST.in, .venv/ is ignored, and dependency checks now evaluate full PEP 508 requirements (markers/extras) and handle dragonfly/dragonfly2 distribution aliasing; docs and tests are updated accordingly.

Written by Cursor Bugbot for commit d5057b9. This will update automatically on new commits. Configure here.

kendonB and others added 5 commits January 9, 2026 11:43
- Rearranged links in _sidebar.md for better organization.
- Updated index.html title and meta description for improved SEO.
- Corrected minor grammatical errors and improved phrasing in README.md and other documentation files.
- Enhanced clarity in Getting_Started_Overview.md and Troubleshooting_Install.md.
- Adjusted formatting and descriptions in various sections for better readability.
Update documentation for clarity and consistency
@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread castervoice/lib/ctrl/dependencies.py Outdated
textformat.secondary_format.clear_text_format()
def run(self, event_content):
pronunciation = event_content["pronunciation"]
_apply_format(pronunciation)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FormattingHook.run receives event object, not dict

High Severity

FormattingHook.run was changed to expect a dict (event_content["pronunciation"]), but HooksRunner.execute still passes a RuleActivationEvent object via hook.run(event). RuleActivationEvent has .rule_class_name and .active attributes and doesn't support [] subscript access, so this will raise a TypeError at runtime whenever a rule activation event fires. Additionally, the deactivation branch that previously cleared text formatting when event.active is False was removed entirely.

Fix in Cursor Fix in Web

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Comment thread Install_Caster_Kaldi.bat
"%runtime_python%" -c "import sys; print('{0}.{1}'.format(sys.version_info.major, sys.version_info.minor))" > "%python_version_file%"
if not errorlevel 1 set /p existing_python_version=<"%python_version_file%"
if exist "%python_version_file%" del /q "%python_version_file%" >nul 2>nul
)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Batch variable expansion fails inside compound if block

Medium Severity

With DisableDelayedExpansion, %python_version_file% inside the if exist (...) block is expanded when the block is parsed — before the set command executes. Since python_version_file is undefined at parse time, it expands to empty string, so the Python output redirect and set /p read both target an empty path. existing_python_version is never populated, causing the version check on the next line to always fail and the venv to be needlessly recreated on every re-run.

Additional Locations (1)
Fix in Cursor Fix in Web

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.

1 participant