Skip to content

Read Aloud starts PowerShell without a console window (#1122) - #1150

Merged
echelon merged 2 commits into
storytold:mainfrom
dkhlapov:issue-1122-read-aloud-console
Oct 14, 2026
Merged

echelon merged 2 commits into
storytold:mainfrom
dkhlapov:issue-1122-read-aloud-console

Conversation

@dkhlapov

@dkhlapov dkhlapov commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

#1122: Read Aloud starts PowerShell without a console window

Fixes #1122. On Windows, Read Aloud speaks each sentence through PowerShell (System.Speech). PowerShell is a console program, so every sentence flashed a console window over the document. The speech command now starts with CREATE_NO_WINDOW (CommandExt::creation_flags); macOS (say) and Linux (espeak-ng) are unchanged.

Tests:

  • Regression test speech::tests::powershell_starts_without_a_console_window pins the flag value.
  • cargo check -p wordcraft-engine --target x86_64-pc-windows-gnu passes.
  • Full CI steps pass.

Not tried on a Windows machine yet.

🤖 Generated with Claude Code

On Windows the speech program is PowerShell, a console program: each sentence it spoke flashed a console window over the document. It now starts with CREATE_NO_WINDOW.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dkhlapov
dkhlapov force-pushed the issue-1122-read-aloud-console branch from 1ef41d9 to fe1c09e Compare October 13, 2026 00:00
@dkhlapov dkhlapov changed the title WIP: [WordCraft] Read Aloud on the Review Tab opens a CLI window during TTS. (#1122) Read Aloud starts PowerShell without a console window (#1122) Oct 13, 2026
@dkhlapov
dkhlapov marked this pull request as ready for review October 13, 2026 00:00
…asses

windows_speech builds the PowerShell program, arguments and creation flags
that speak() turns into its Command; std can't read creation flags back from
a Command, so the test checks that value (CREATE_NO_WINDOW) and the arguments.

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

Copy link
Copy Markdown
Contributor Author

Review follow-up (2fcf718): the test now checks the value the spawn really uses. windows_speech() returns the program, arguments and creation flags, and speak() builds its Command from that. cargo check and clippy -D warnings pass for x86_64-pc-windows-gnu --tests. Full CI passed.

@echelon

echelon commented Oct 14, 2026

Copy link
Copy Markdown
Member

Thanks for the contribution, @dkhlapov! This has landed in main. If you haven't already, come join us on Discord: https://discord.gg/artcraft

zhaikong pushed a commit to zhaikong/wordcraft that referenced this pull request Oct 15, 2026
@dkhlapov
dkhlapov deleted the issue-1122-read-aloud-console branch October 15, 2026 19:27
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.

[WordCraft] Read Aloud on the Review Tab opens a CLI window during TTS.

2 participants