Here is a screenshot of the trigger I made (it's pretty simple)
What's happening here? Is it opening the .mp3 as a file, which that window appears in order to play it ?
If it's just simply a matter of having the computer speak some text, you can use AppleScript to invoke the text-to-speech synthesiser, which will say whatever is typed, and offer different voices, which can each be modulated by pitch, frequency, volume and speed.
say "What is it you can't face?" using "Kate"
say "If you seek Amy." using "Daniel"
say "I'd love that." using "Amy"
You'll have to look up the various other options for manipulation of the waveform in the Scripting Additions dictionary, as I don't have a computer. I don't even know if "Amy" is a possible voice, but I like to think she'll be an Aussie.
So what mine does currently is it plays an audio file that I already created. So essentially it opens a file named "Greeting1" that plays in a media player and then it returns to the active screen I was working on (But that part isn't part of this, just it plays a file). What I'm trying to do is have it so that when I click the Touch Bar button, it randomly chooses one of the files in the folder, for simplicity lets call those Greeting1, Greeting2, and Greeting3, and then it plays that file. The part that I can't get is how to randomly select a file from the folder. I don't want it to do the same one every time and if it's random between a few different options than it sounds more realistic