Which device converts heat energy into mechanical energy

Electrical motor

Loudspeaker

Generator

Steam engine