Which device coverts mechanical energy into electrical energy?

Electrical motor

Loudspeaker

Steam engine

Generator