Which device coverts mechanical energy into electrical energy?

Generator

Loudspeaker

Electrical motor

Steam engine