I'm not real sure what you mean, but simply attaching a speaker to the circuit board of a non-sound DCC loco is not going to do anything. Without all the software and hardware in the decoder, there will be no sound signal to drive the speaker.
Now, if you want to install a decoder with sound, I am sure that won't be too difficult.