Repository navigation
HLE: list the host's voices to the title and speak in the one it picks - #2770
kilolimaVI wants to merge 2 commits 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)
Voice listing (slot 0x40) called back with no voices, and a custom voice was ignored. The host's WinRT voices are now listed as XSpeechSynthesizerVoiceInformation records (description, display name, gender, id, language), and a synthesizer keeps the voice the title picks by id until it sets the default again; an id the host does not have is refused with E_INVALIDARG. Assisted-by: Claude (Claude Opus 5.5)
|
Independent verification of head
Method: WARP/CPU only (no physical GPU; AI-assisted review (Claude Code / Claude Sonnet 5.5). |
|
Thanks @oni-swr, especially for the negative control: good to know the voice test fails when the audio is fake. On the double close: agreed. Two more things apply here, both from review of my (now closed) speech PR this is stacked on:
Both are fixed in the same change on DexNom/VIctory: one speech thread owning the synthesizer, handles as keys into a table (double or foreign closes refused), and output converted to 16 kHz mono; 20 consecutive parallel runs pass there. Here I'm converting this to a draft until #82 (the earlier speech PR) is rebased or merged, then I'll rebuild voice listing on top of it with those fixes. |
|
Builds on #2760's synthesize path with real voice enumeration - SpeechSynthesizer::AllVoices mapped into the title's VoiceInformation records so the title's picked voice is actually honored rather than always default. The record layout for the voice list was the unknown flagged in #2760; this apparently resolves it. Untested-live caveat in the README stays honest. |
|
Thanks @kotekompotek. The record layout isn't guessed: it's the documented |
Stacked on #2760; only the top commit belongs here.
GTA VI's narration settings let the player pick a voice, but voice listing (slot 0x40) reported no voices and a custom voice (slot 0x60) was ignored. Now:
XSpeechSynthesizerEnumerateInstalledVoicescalls back once per host voice (WinRTSpeechSynthesizer::AllVoices) with anXSpeechSynthesizerVoiceInformationrecord laid out as documented (description, display name, gender 0 female / 1 male, voice id, language), stopping when the callback returns false. The strings live until the call returns.XSpeechSynthesizerSetCustomVoice), untilSetDefaultVoice. An id the host does not have is refused withE_INVALIDARG. Streams are spoken in the picked voice, or the default if that voice disappears.Tested
cargo test -p victory-hle --lib speech: 5 passed, none skipped (two new: the listing read back as the title reads it, and a picked voice speaks)cargo clippy --workspace --all-targets --locked -- -D warnings: cleanNot tested
E_INVALIDARGis a guess.AI use
Code, tests and description written with Claude (Claude Opus 5.5); I built and ran the tests on the hardware above.