Advances in spectroscopy for lasers and sensing