ac1.52, u5.3.5p4
It's a common case to rethink dialogues. Sometimes I change the Speaker and change the text, or leave the text if it is just a greeting.
When there is a speech manager id present on a "Dialogue" "Play speech" Action and I change the Speaker to whatever or Player line and I hit "Gather text" ind the Speech Tab of the AC Game Editor then the ID stays the same, although there already might exist another speech action with that id for the player.
In my case the id was 762 and stayed 762 when I changed the speaker from an NPC to a player.
There already was an Action with that ID for the Player, and the action that had 762 now has 985. So the audio file is not correct anymore.
Comments
If you change your speech speaker + text after an ID has been generated for it, you should first reset the Action completely by changing the Action type to something else, and then back to Dialogue: Play speech.
But I'm still not clear on how the player already has a speech Action of ID=763. If Speech Action Z was 763 the whole time, at what point did the "somewhere else" Player Action get one of the same number?
Each ID number should only be listed once in the Speech Manager - two characters can't share the same one. When you click "Gather text", AC will detect such conflicts and address them - seen here by the fact that Y's ID goes from 763 to 985. This is a "safety measure" to prevent problems, though I appreciate it can be annoying if it occurs.