The Diesel Generator you saw usually in Family functions or industries converts
The hydrocarbons are burned to produce heat and this used in the alternator to move stator assembly which eventually produces electricity.
so mechanical to electrical energy would be the most suitable answer.