The device which converts the chemical energy into electrical energy?

Electrical motor

Steam engine

Generator

Battery