Which device converts heat energy into mechanical energy

Steam engine

Loudspeaker

Generator

Electrical motor