Which device coverts mechanical energy into electrical energy?

Generator

Electrical motor

Loudspeaker

Steam engine