Which device converts heat energy into mechanical energy

Electrical motor

Loudspeaker

Steam engine

Generator