Text this: Spectroscopy in heterogenous media and applications for bioprocess and environmental monitoring