karashiiro / TextToTalk

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

Option to disable during voiced cutscenes #7

Closed karashiiro closed 1 year ago

karashiiro commented 3 years ago

See title. For this to happen we need some list of voiced cutscenes and a method of detection.

johnysandels commented 3 years ago

I was using Anna's Sound Log And it seems like all voice lines come from cut/ex(1-3)/sound/voicem/..(ex number varies by expansion the voice is coming from) and some voices in the beginning of the game come from cut/ffxiv/sound/manfst/... and they fire right as the text box comes up. So you could scan for those voice files firing while the current condition is Current ID: 35 Enum: OccupiedInCutSceneEvent and not trigger TTS if a sound from that directory fires when the dialogue box pops up.

karashiiro commented 3 years ago

Oh, this could work. I might be able to pull file load detection from Penumbra or something.

johnysandels commented 3 years ago

Well I checked how the files load with reslogger, and it loads al the voices at the beginning of the cutscene during the loading screen and then fire at the appropriate time. Wonder if Anna's Sound Logger would be a good place to start because it detects when the voices actually fire. I've found a couple of cutscenes where one textbox is voiced, and the rest of it is unvoiced for the rest of the cutscene

karashiiro commented 3 years ago

Oh, I just woke up 🥴 Will check that.

karashiiro commented 3 years ago

Actually, where is that? Not seeing it on her plugin repo (or in Discord).

johnysandels commented 3 years ago

It's part of her Sound Filter plugin

johnysandels commented 3 years ago

Oh not sure if you know this, but I remember reading something about sound file streaming, and how Anna's sound logger disables it so it can see when the sounds start playing and the sound paths for cutscene text. I think they said Penumbra also disables sound streaming. Hope that's helpful!

johnysandels commented 3 years ago

Oh, this could work. I might be able to pull file load detection from Penumbra or something.

I think Penumbra does disable sound streaming so this could work too.

With sound streaming disabled it loads the voice audio file right as the NPC dialogue box pops up.

dedren commented 3 years ago

Oh this would be awesome for us controller players who stream to TV and are far from their keyboards 😀!