Can I use speech to text to send a new phrase to play via TTS?

Maybe a half-step above HA noob here.

Basically aiming for one-way intercom functionality. I have figured out how to make a speaker play a pre-set phrase, but is there a way to give that action different input at different times, ideally via the mic on my phone?

Thanks in advance!