karashiiro / TextToTalk

Chat TTS plugin for Dalamud. Has support for triggers/exclusions, several TTS providers, and more!
MIT License
46 stars 30 forks source link

Skip reading voice-acted NPC dialogue #131

Closed spinda closed 1 year ago

spinda commented 1 year ago

By hooking into FFXIV's sound management, we can detect when playback starts for voice-acted lines and skip reading out the corresponding text. Voice lines are detected by applying some heuristics to their file names; these heuristics may not be perfect. The file name of a sound is only available when it's loaded, and not later when it's played back, so some care must be taken to correctly keep track of voice line sound resources and their corresponding memory addresses as they're loaded and unloaded by the game.

I consider this experimental, and it'll probably be fine-tuned as I continue to play through the main story with it enabled. I'm submitting this now for early feedback and testing.

Resolves #7.

karashiiro commented 1 year ago

Looks good - in case I ever need to update these, how did you get the sigs for this?

spinda commented 1 year ago

I found the signature strings in the Sound Filter plugin: https://git.anna.lgbt/ascclemens/SoundFilter/src/branch/main/SoundFilter/Filter.cs#L12

spinda commented 1 year ago

Added a comment to that effect for future reference.