Connect my asterisk tts to piper addon

I have a advanced asterisk system. I use my voip phones to control home assistant.
And i have a overcoded awnsering machine.

I currenltly use google cloud tts service. And i want to use my local piper addon so that it works when the internet is down.

Does someone know how you can get speech from text using the linux commandline?