Yes, it looks like a silly approach, but I was looking for a way to call this function once and I didn't find anything.
Yep, I realized what you were trying to do and why you were trying to do it. And it was a valiant attempt. Here's the thoughts just off the top of my head. Have an array of all of your voice files with say 2 fields, the file name and a boolean (as a string). Pass the file name to the 'speakText' function as a parameter. When the speakText is run, have it check the array and see where that file name is in the array and then, set the boolean to true. When the On "textAudio" ended is run, you can again, look at the array and see which one is set to true and that tells you the last audio file played. That way, you can get away with using 1 tag and still know which voice file was played last.
This is probably not the prettiest solution, but it works :-)
Elegance is for physicists.