Repository navigation
HLE: speak the title's narration with the host's speech synthesizer - #82
permadiego wants to merge 1 commit into
Conversation
Speech streams were always empty WAVE files, so narration was silent. They are now spoken by the WinRT speech synthesizer in the host's default voice, on a thread of our own in the multithreaded apartment, then mixed to mono and resampled to the 16 kHz 16-bit PCM the silent stub already used. SSML the host refuses is spoken as its plain text. A stream handle is its boxed WAVE file, freed when the stream closes. With no voice, or off Windows, streams stay empty WAVE files. victory-hle now depends on windows on Windows (it was diagnostics-only) with the Foundation, Media_Core, Media_SpeechSynthesis and Storage_Streams features. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Tested
No game data used. |
… synthesizer Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
#691 is the same feature (WinRT Checked by reading both diffs. AI-assisted (Claude Code). |
|
Tested this branch on Windows 11 with pt-BR voices (Microsoft Maria and Daniel), a different setup from the Windows 10 / English voices above: 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:
Happy to help if you want either change. |
…peech synthesizer
…peech synthesizer
|
Automated triage for the maintainers. Needs rebase. This PR does not merge cleanly into current The content has not been reviewed yet; it will be once the branch is rebased onto Generated by Claude Code |
…are on the card before the character bake; one host copy per placed texture - The depth bounds test (Marvisak#82 by Kaivyyy, as is): a pipeline that enables it is made from a DEPTH_STENCIL1 stream under its own library name, and the title's OMSetDepthBounds reaches the host list. Before, such draws passed at every depth. On the test machine (RTX 4070) the first room is lit by its lamp for the first time: walls, table, bunks. - Defaults: what shaders wrote is copied back by a thread of its own (stage 2), wide copy-back, card copies from 1 MiB up to 1,024 MB, and 256 lists in the air. About 230 ms a frame where it was about 400. Off: VICTORY_RELAY=0, VICTORY_WIDE_BACK=0, VICTORY_CARD_BUFFERS_MIN_MB=16 VICTORY_CARD_BUFFERS_MB=512, VICTORY_LATE_WAIT_LISTS=128. - Textures picked by index are uploaded while loading and before a draw of the title's decoration bake, which samples them by index and runs once (VICTORY_EARLY_TEXTURES_MS, VICTORY_BAKE_TEXTURES_MS; 0 turns each off). - Placed textures are keyed without the filler words of their description: two views that differed only there each had a host copy (VICTORY_PLACED_FILLER=1 keeps the old key). - VICTORY_TEXTURE_ROOM_PERCENT (90, unchanged) sets how full the card may get before textures picked by index wait. Known: the first room's walls are still missing in some launches, and shaded areas are too dark (the bounce light has no ray-tracing structure to trace yet). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…are on the card before the character bake; one host copy per placed texture - The depth bounds test (Marvisak#82 by Kaivyyy, as is): a pipeline that enables it is made from a DEPTH_STENCIL1 stream under its own library name, and the title's OMSetDepthBounds reaches the host list. Before, such draws passed at every depth. On the test machine (RTX 4070) the first room is lit by its lamp for the first time: walls, table, bunks. - Defaults: what shaders wrote is copied back by a thread of its own (stage 2), wide copy-back, card copies from 1 MiB up to 1,024 MB, and 256 lists in the air. About 230 ms a frame where it was about 400. Off: VICTORY_RELAY=0, VICTORY_WIDE_BACK=0, VICTORY_CARD_BUFFERS_MIN_MB=16 VICTORY_CARD_BUFFERS_MB=512, VICTORY_LATE_WAIT_LISTS=128. - Textures picked by index are uploaded while loading and before a draw of the title's decoration bake, which samples them by index and runs once (VICTORY_EARLY_TEXTURES_MS, VICTORY_BAKE_TEXTURES_MS; 0 turns each off). - Placed textures are keyed without the filler words of their description: two views that differed only there each had a host copy (VICTORY_PLACED_FILLER=1 keeps the old key). - VICTORY_TEXTURE_ROOM_PERCENT (90, unchanged) sets how full the card may get before textures picked by index wait. Known: the first room's walls are still missing in some launches, and shaded areas are too dark (the bounce light has no ray-tracing structure to trace yet). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…are on the card before the character bake; one host copy per placed texture - The depth bounds test (Marvisak#82 by Kaivyyy, as is): a pipeline that enables it is made from a DEPTH_STENCIL1 stream under its own library name, and the title's OMSetDepthBounds reaches the host list. Before, such draws passed at every depth. On the test machine (RTX 4070) the first room is lit by its lamp for the first time: walls, table, bunks. - Defaults: what shaders wrote is copied back by a thread of its own (stage 2), wide copy-back, card copies from 1 MiB up to 1,024 MB, and 256 lists in the air. About 230 ms a frame where it was about 400. Off: VICTORY_RELAY=0, VICTORY_WIDE_BACK=0, VICTORY_CARD_BUFFERS_MIN_MB=16 VICTORY_CARD_BUFFERS_MB=512, VICTORY_LATE_WAIT_LISTS=128. - Textures picked by index are uploaded while loading and before a draw of the title's decoration bake, which samples them by index and runs once (VICTORY_EARLY_TEXTURES_MS, VICTORY_BAKE_TEXTURES_MS; 0 turns each off). - Placed textures are keyed without the filler words of their description: two views that differed only there each had a host copy (VICTORY_PLACED_FILLER=1 keeps the old key). - VICTORY_TEXTURE_ROOM_PERCENT (90, unchanged) sets how full the card may get before textures picked by index wait. Known: the first room's walls are still missing in some launches, and shaded areas are too dark (the bounce light has no ray-tracing structure to trace yet).
…e the character bake fxceless/victory-fork moved from a803c87 to c96b4f2 while this branch was being merged the first time. The three things it settles are all ones this tree was measuring: - Marvisak#82's depth bounds test: a pipeline that enables it is made from a DEPTH_STENCIL1 stream under its own library name, and the title's OMSetDepthBounds reaches the host list. This tree printed 'a pipeline enables the depth bounds test, which its host pipeline leaves out' four times a run and then drew those passes at every depth. - Defaults: stage-2 copy-back, wide copy-back, card copies from 1 MiB, 256 lists in the air - about 230 ms a frame where it was about 400. That is exactly the world's 558-620 ms frames measured here on WARP. - Textures picked by index are uploaded while loading and before the decoration bake, and placed textures are keyed without their filler words. No conflicts. cargo test: victory-gpu 114 passed, victory-hle 101 passed, victory-shader 215 passed; the diag binary builds.
Merge PR Marvisak#82: Translate tiled cascade shadows exactly on wave32 GPUs. Their tests in wave64_tests.rs are left out (the file diverged); our victory-shader tests run instead. (cherry picked from commit 0cb13721b238fb9c94fcab287c45bcd666d0530d) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YZ2Pr8swD7jDUjEfVNNuKC
A pipeline whose title description enables the depth bounds test (subobject 21, DEPTH_STENCIL1) is made with it, where the host GPU has the test (D3D12_OPTIONS2): graphics pipelines as a pipeline-state stream with DEPTH_STENCIL1 (the plain description has no field for it), mesh pipelines and their amplified twins with DEPTH_STENCIL1 in their stream. The state description names the test, so such a pipeline has a library entry of its own. The title's OMSetDepthBounds is kept in the list's draw state, set on the host list, and set again on a list cut. Before, the test was dropped and such draws passed at every depth; the fork's author reports the first room lit by its lamp with it (walls, table, bunks). Our mesh_pipeline keeps its amplification-stage parameter: its stream is generic over the depth subobject. A GPU test makes a depth-bounds pipeline, loads it back from the library, and checks that a draw at depth 0.5 is rejected by bounds [0.6, 1.0] and passes [0.4, 0.6] on a list that got the bounds through the state's replay. Ported from fxceless/victory-fork c96b4f2, the depth bounds part only (Marvisak#82 by Kaivyyy). Its default changes (relay, wide copy-back, card buffers, lists in the air), early and bake-time texture uploads and placed-texture keys are not taken.
What 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