TextToTalk icon indicating copy to clipboard operation
TextToTalk copied to clipboard

Repeated dialogue and different pronunciation of name from 1st to 2nd time

Open ryankhart opened this issue 3 years ago • 8 comments

What happened?

In this video, the NPC introduces himself as "Brother E-Sumi-Yan" but pronounces it as "Brother Sumi-Yan". Then, TextToTalk repeats the same line of dialogue but instead it says it like "Brother E-Sumi-Yan" as the expected pronunciation.

https://user-images.githubusercontent.com/3673962/162417056-5db11512-f0d7-45d5-9246-6b60716d657a.mp4

What should happen?

It should have just read the line once and pronounced "Brother E-Sumi-Yan" with the "E-" part included.

Steps to reproduce

  • Enable "Read NPC dialogue from the dialogue window" from the Synthesizer Settings tab.
  • Enable "NPC dialogue" in the current active preset in the Channel Settings tab.
  • Start a new conjurer character.
  • Speak to E-Sumi-Yan at the Conjurer's guild.
  • Answer his question with "no" every time so that you can repeat his dialogue until you can reproduce the issue.

Possible Cause

I suspect that the reason for the repeat is because TextToTalk is getting slightly different text from the dialogue window and from the chat window, so it ends up reading them both. Because TTT correctly pronounces the name the second time, I don't believe that this is a lexicon issue.

ryankhart avatar Apr 08 '22 10:04 ryankhart

It looks like you have the NPC Dialogue chat channel selected in the Channel settings tab. Disabling will probably fix that. Someone else was reporting a similar issue of text sometimes repeating with it enabled. Your theory about slightly different text in chat vs dialogue box may be causing the repeat is very possible. I personally would suggest only having only read from dailogue box, or read from NPC Dialogue chat channel selected at a time.

johnysandels avatar Apr 16 '22 08:04 johnysandels

It looks like you have the NPC Dialogue chat channel selected in the Channel settings tab. Disabling will probably fix that.

I should have mentioned that somewhere on this issue. Yes, that would indeed stop this from happening, but I consider that more of a user workaround a bug.

That being said, even if I were to disable "NPC Dialogue" from the preset, it remains the case that it still left off the first syllable of his name but pronounced it correctly when it read it again from the chat box.

Another reason to want to keep "NPC Dialogue" enabled is for NPC's shouting unvoiced instructions to the party in duty about what to do, meanwhile, the player might be so preoccupied with other mechanics not to be able to read and do the mechanics at the same time.


I actually coincidentally came here just now to post another video example of an issue with a dash-like character that's messing up the text to speech. In this video it literally speaks the dash as "dash".

https://user-images.githubusercontent.com/3673962/163668172-8448b389-322f-4ace-b3d9-879b330ed973.mp4

I have an idea to troubleshoot this. It may be helpful to have the debug build of this plugin print to the PluginLog (I think that's what it's called). That way, when the issue comes up again, I can take the last 30 seconds of captured video along with the captured raw text of what TTT is getting from the dialogue box and start to piece together the puzzle for what's causing this bug.

ryankhart avatar Apr 16 '22 08:04 ryankhart

Ohp! I spoke too soon. It already seems to print everything I think I should need into the PluginLog.

01:24:40.039 | INF [TextToTalk] <speak><prosody rate="125%">No! I couldn't possibly - ! We did not come here to fritter away the royal coin!</prosody></speak>

That's the line I got from the log.

ryankhart avatar Apr 16 '22 08:04 ryankhart

True about the dash error. I do feel like enabling reading from chat should realistically disable and gray out reading chat from the NPC dialogue channel though

Another reason to want to keep "NPC Dialogue" enabled is for NPC's shouting unvoiced instructions to the party in duty about what to do, meanwhile, the player might be so preoccupied with other mechanics not to be able to read and do the mechanics at the same time.

I'm pretty sure the battle text during duties is in the NPC Announcements channel. Including what youre mentioning. There might be random one off comments in the NPC dialogue channel though?

johnysandels avatar Apr 16 '22 09:04 johnysandels

I'm pretty sure the battle text during duties is in the NPC Announcements channel.

Oh ya, I think you're right about that. My memory is a little hazy but I seem to recall some instances where I failed an instance, some solo and 1 group duty in HW, where I had forgotten that a friendly NPC was with us and that I had to keep them alive as healer.

ryankhart avatar Apr 16 '22 21:04 ryankhart

Here's another one.

18:40:49.945 | INF [TextToTalk] <speak><prosody rate="125%">But I shall not complain. We have piqued Lolorito<phoneme ph="z">s</phoneme> interest and secured his invaluable expertise.Thank you, Kayden. I could not have done it without you.</prosody></speak>

https://user-images.githubusercontent.com/3673962/163696751-6d72967a-d373-47ad-9f5d-7811b511d1fc.mp4

ryankhart avatar Apr 17 '22 01:04 ryankhart

I found the culprit for what was removing the '-' on this line here: https://github.com/karashiiro/TextToTalk/blob/4d9128b3d4a8d83d4e7cd8d27723e968bf278e05/src/TextToTalk/Talk/TalkUtils.cs#L14

When I commented out this line below, and I had NPC dialogue enabled in the "Channel Settings" tab, the TTS correctly pronounced "E-Sumi-Yan" and did not repeat itself when going through the dialogue in the video at the top of this page. https://github.com/karashiiro/TextToTalk/blob/4d9128b3d4a8d83d4e7cd8d27723e968bf278e05/src/TextToTalk/TextToTalk.cs#L168

I've gone so long with this stutter remover implemented that I don't really know what it's protecting against if we were to hypothetically remove it, let alone tweak it. Maybe we can start with a user toggle for this feature, which can double as a workaround for users who care to disable it, but also as a tool for us to compare with and without the RemoveStutters method in order to better improve the regex that powers it.

ryankhart avatar May 08 '22 06:05 ryankhart

Oh interesting. I just noticed that even with the stutter remover enabled still, the repeating dialogue from NPCs such as E-Sumi-Yan has actually been fixed in an update since I created this issue.

I've also added an experimental option in the config window for disabling the stutter remover. It defaults to exactly the way that it has been for a long time now. I'll be submitting a pull request for it soon.

ryankhart avatar May 08 '22 07:05 ryankhart