The energy transformation that occurs when a smoke alarm goes off is electrical to sound.
In a smoke alarm, electrical energy from its power source (batteries or electrical connection) is used to generate sound energy when the alarm is triggered, typically by a smoke detector detecting smoke particles in the air.