You should be able to talk but not sing while exercising.
To benefit from exercise you need to work hard enough that you are breathing harder than when you are resting.
If you become very short of breath and find it difficult to say more than a few words you are working too hard. There is no advantage to training at such a high intensity that you are gasping for air. In fact, exercising at such a high intensity can be dangerous for some individuals.