Text this: Artificial Intelligence-Supported Spatial Scanning for Enhanced Real-Time Spectral Analysis of Heterogeneous Media