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

All Speech is interrupted by new dialogue box text and chat box messages when "Cancel the current speech when new text is available or text is advanced" is enabled. #35

Closed johnysandels closed 3 years ago

johnysandels commented 3 years ago

The following bug occurs when "Cancel the current speech when new text is available or text is advanced" is enabled.

     Ideally this feature should only cancel dialogue text when new dialogue text is available or advanced.

A possible solution to this is to label dialogue text in the queue as dialogue, and when new dialogue text is available or text is advanced, clear the text labeled, "dialogue". Then, move triggered chat messages up the queue so they aren't lost.

I think people probably only want dialogue messages to interrupt dialogue messages, and everything should not interrupt each other.

Here is an recording using /echo and a dialogue box as an example of chat messages interrupting dialogue, dialogue interrupting chat messages, and chat messages interrupting chat messages.

https://streamable.com/8rpyoh

Feel free to reach out if you need any clarification! this one was a bit wordy because it was hard to explain 😅

karashiiro commented 3 years ago

Should be done when https://github.com/goatcorp/DalamudPlugins/pull/969 is merged.

johnysandels commented 3 years ago

I'm sorry if I confused you but I do actually like when the speaker is reset when their dialogue box disappears and reappears. It worked really well, so I'm sorry that I accidentally made you revert that! it was one of my favourite and most wished for features 😅

What I meant to say was that chat text is currently being cleared by the Dialogue box being read out loud. New Dialogue boxes interrupting old dialogue boxes is the intended use.

Dialogue boxes interrupting messages from chat is more of the issue, but the inverse of chat messages interrupting dialogue boxes has been fixed in your newest update. Ideally People wouldn't want to lose messages read out loud in chat because of a dialogue box, I think they'd want it in order of what's triggered. and if the dialogue box speech is skipped, it would read the next speech in the queue first, It currently seems like new dialogue is clearing the queue completely. and it would be nice if it was put in the back of the queue, and let other speech from chat go first if it was in the queue first. and if there's new dialogue, it would clear or skip the old chat dialogue in the queue.

Here's a diagram how I think the queue should behave. I think a visual interpretation might be a better way to express it than words, because it's complicated to explain but simple visually.

Dialogue skipping queue


Again I would like to mention that the speaker being reset when their dialogue box disappears and reappears is the ideal feature, and I'm so sorry for making you revert that! It was the feature I was most looking forward to!

I do know that I'm being a bit knit picky, I just know that if people have certain chat channels enabled for TTS, it means that they want to hear it, and if it gets skipped because of a dialogue box I could imagine it being annoying.

Thank you for being so kind and patient! I really appreciate it!

karashiiro commented 3 years ago

Oh, I didn't know that the speaker being reset was related to this request, I reverted that for an entirely different reason. I thought it'd be neat, but based on feedback it sounded like it felt more inconsistent than anything else. I guess I can revert it again and see how it goes.

As for the dialogue versus chat stuff, I was pretty sure that was how this worked, at least from TextToTalk/TextToTalk.cs#L129-L136. When new data is found in the Talk addon, it should remove all queued items originating in the Talk addon from the queue, without touching any queued items from chat.

It sounds like it's just bugged now, will look into it.

karashiiro commented 3 years ago

Oh, I'm just blind, the queue removal thing is reversed in the code I just posted.

karashiiro commented 3 years ago

Fixes will be merged with https://github.com/goatcorp/DalamudPlugins/pull/971.

karashiiro commented 3 years ago

Should be fixed, merging with the linked PR.