I have done this for a couple of my DCC service customers. I used a SoundTrax Tsunami AT-1000 decoder. While intended as a board replacement decoder for Atlas diesels, it can be adapted for use in the Bachmann GP 40. The biggest issue is milling the frame weight to make room for the speaker. I milled the frame above the rear truck to make room for a 16mm by 35mm oval speaker and enclosure. You have to totally strip the frame first. Then you need to mill the frame either using a milling machine or band saw. You can do it with a hack saw, but it it really difficult to do that way unless you can securely clamp the weight in a vice. You also have to be careful not to disturb the portion of the frame/weight where the rear truck attaches.
Tom
Tom