Artificial Intelligence for Spectroscopy