The correct response is: electrical to sound.
In a smoke alarm, the device detects smoke through a sensor, which generates an electrical signal. When smoke is detected, this electrical signal activates a mechanism to produce a sound (the alarm), resulting in the transformation from electrical energy to sound energy.