The TAP noise and static is mostly from the header bytes also being processed. In the Deepgram API URL you can add additional container=none
parameter to make sure that headers are not sent from Deepgram.
You can read more about this in the Deepgram docs:
https://developers.deepgram.com/docs/tts-media-output-settings#why-do-i-hear-clicks-in-my-audio