Python Local Command TTS

I’m attempting to write a python script that utilizes a third party TTS service. I currently have a python script that gets the raw wav data as a variable. How do I output this from the script to be able to run TTS as a local command properly?

Sorry if this is a dumb question as I’m a novice here.