High-power terahertz sources for spectroscopy and material diagnostics