The present invention provides a switching power supply used for sound speaker, characterized in that the switching power supply includes an input circuit, a transform circuit, an output circuit, a detection circuit, a protection circuit, a control circuit, a power detection circuit and an auxiliary power supply; the output end of the input circuit is connected with the ends which are connected with the output circuit in orders by the transform circuit, and connected with the input end of the power detection circuit, the input end of the detection circuit and the input end of the protection circuit; the output end of the detection circuit, the output end of the power detection circuit and the output end of the protection circuit are connected with a signal input end of the control circuit respectively, the output end of the control circuit is connected with the control signal input end of the transform circuit, the input end of the detection circuit is connected to the output end of the output circuit after connected with the input end of the protection circuit; the output ends of the auxiliary power supply are connected to the power input end of the control circuit and the power detection circuit respectively. The invention automatically adjusts the output voltage by the change of the load, automatically reducing the inner loss, having lower power consumption, high credibility, lower cost, easier market promotion.