If it is an ESU LokSound 5 decoder, the problem probably depends on the speaker.
The modular sound box must be completely sealed, there must not be the slightest passage of air. We suggest using cyanoacrylate glue.