Repository navigation
HLE: speak the title's narration with the host's default voice - #2760
kilolimaVI wants to merge 1 commit into
Conversation
Text and SSML streams were empty WAVE files, so narration was silent. They are now synthesized with Windows speech synthesis (WinRT SpeechSynthesizer) into the WAVE file the title reads back; with no working host voice the stream is the old silence. Voice listing and custom voices are still not supported. Assisted-by: Claude (Claude Opus 5.5)
|
Good shape: WinRT SpeechSynthesizer -> stream -> DataReader -> WAVE bytes, with SILENCE as the fallback so narration stays valid-but-empty on hosts without a voice. Honestly documented shortcut (default voice only, no voice enumeration since the title's voice-info record layout is unknown). |
|
Reviewed and tested Blocking bug reproduced on Windows 11: concurrent WinRT
|
|
Thanks @fuzeofficial for the thorough test and review, and @kotekompotek for the look. I confirm the crash: creating and dropping a WinRT I also hadn't seen #82, which predates this, already synthesizes on a dedicated MTA thread and converts to 16 kHz mono PCM. Rather than compete with it, I'm closing this in favor of #82. My voice-selection change (listing host voices for slot 0x40 and honoring the picked voice) isn't in #82, so I'll rebase that onto #82's approach as a follow-up. |
Narration ("Screen Narration" in the title's accessibility settings) was silent: every speech stream was an empty WAVE file. Text (slot 0x68) and SSML (slot 0xa8) are now spoken by the host's default voice through WinRT
SpeechSynthesizer, and the title reads back the WAVE file it makes. Where the host has no working voice, the stream is the previous silence, so nothing gets worse.What is in it
crates/victory-hle/src/modules/speech.rs: synthesis, per-stream handles that own their audio (freed on close, slot 0x70), testscrates/victory-hle/Cargo.toml:Media_Core,Media_SpeechSynthesis,Storage_Streamsfeatures ofwindowsREADME.md: the runtime services rowTested
cargo test -p victory-hle --lib speech: 3 passed;the_host_voice_speaks_text_and_ssmlsynthesized real audio for both text and SSML (not skipped)cargo test --workspace: 781 passed, 0 failed, 9 ignoredcargo clippy --workspace --all-targets --locked -- -D warnings: cleanNot tested
AI use
Code, tests and description written with Claude (Claude Opus 5.5); I built and ran the tests on the hardware above.