Text this: Delay-resolved spectroscopy in terahertz photonic circuits