Add internal api for server TTS and error callback logic