HLE: speak the title's narration with the host's speech synthesizer #82
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!82
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-82"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@permadiego on GitHub · 2026-11-24 00:19 UTC · original
permadiego:hle/speech-synthesis→main· +301 −41 · 2 files · 1 commits · openWhat changed
The title's narration (accessibility speech) was silent: every stream the accessibility provider created (slot 0x68 from text, 0xa8 from SSML) was an empty WAVE file. It is now spoken by the host's WinRT speech synthesizer (
Windows.Media.SpeechSynthesis) in its default voice.victory-hlenow depends onwindowson Windows (it was optional, for diagnostics only), addingFoundation,Media_SpeechSynthesisandStorage_Streams.victory-gpualready builds the crate, so this adds only those modules.Not done: voices are not listed (
enumerate_voicesstill reports none) and the title's voice choice is ignored; the default voice speaks everything.Verification
cargo test -p victory-hle speechon Windows 10 with the David, Zira and Mark voices:data) mixes and resamples to 1,600 samples of the expected value; 8-bit and non-WAVE input is refused.Not run in the game: I have no world run here, so the title playing the narration is untested.
🤖 Generated with Claude Code
@DaviTostes on GitHub · 2026-11-24 01:12 UTC · original
Tested
df5e928: pass (no regression).cargo xwin ... --target x86_64-pc-windows-msvc -p victory-hle: 83 passed, 1 failed, including the 4 tests this PR adds.modules::net::tests::only_loopback_is_reachable— Wine'sws2_32lacksWSAConnectByList(the same gap as #118), not this PR.No game data used.
@Exorion1er on GitHub · 2026-11-24 09:33 UTC · original
#691 is the same feature (WinRT
SpeechSynthesizerfor the title's narration), but its branch includes a workspace-widecargo fmtcommit (36 files, about +1,800/−650), so it conflicts withmainand would conflict with many open PRs. This PR changes onlyspeech.rsandCargo.tomland merges cleanly. #691's speech part has a few more tests, which could be carried over here.Checked by reading both diffs. AI-assisted (Claude Code).
@gabrielvbraga on GitHub · 2026-11-24 13:47 UTC · original
Tested this branch on Windows 11 with pt-BR voices (Microsoft Maria and Daniel), a different setup from the Windows 10 / English voices above:
cargo test -p victory-hle speechpasses all 4 tests, includingtext_and_ssml_are_spoken_when_a_voice_is_installed.I'd started the same thing in #825 before seeing this PR, and I'll drop mine in favour of this one. Two differences in my branch (https://github.com/gabrielvbraga/VIctory/tree/speech-synthesis) that may be worth taking:
speakjoins its thread with no time limit, so a synthesizer that never completes would block the title's thread for good. Mine keeps one long-lived speech thread and waits withrecv_timeout(10 s), falling back to the silent stream.close_streamfrees whatever handle it is given, so a second close of the same stream is a double free, andstream_size/stream_dataon a closed handle read freed memory. Mine keeps open streams in a map keyed by handle: close frees only a handle still in the map, and an unknown handle reads as silence.Happy to help if you want either change.
@Marvisak on GitHub · 2026-11-25 00:15 UTC · original
Automated triage for the maintainers.
Needs rebase. This PR does not merge cleanly into current
main(ac2525d). Conflicting files:crates/victory-hle/Cargo.toml.The content has not been reviewed yet; it will be once the branch is rebased onto
main.Generated by Claude Code
@gabrielvbraga on GitHub · 2026-11-26 16:50 UTC · original
The two changes I suggested above are on this branch, rebased onto current main and passing clippy and tests: https://github.com/gabrielvbraga/VIctory/tree/speech-synthesis
Happy to send them as a small follow-up PR once this one is merged.
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.