Brother, your question has been posted for a long time. I have seen it a few times. I am too busy and have no time to answer the question. I will give you a brief introduction. You can search for detailed information. If you understand electronics this is easy to understand.
The chip you are talking about is called a music chip (also called a voice chip). It contains solidified music (sound) data, and of course it can also be human voice, such as the stop announcer on a bus. There are many music stored in it, such as doorbells and music boxes.
Generally, there is a triode on the music piece, which plays the role of amplifying and driving the speaker. The songs are pre-stored in the music piece, so as long as there is electricity and a speaker, the sound can be produced.
About changing the song:
First, change to another type of music piece (just connect all the wires in their original positions). When purchasing, you can ask the boss about the music piece. What song is in it.
Secondly, there is a musical film with many songs in it. One of the pins is used to change the next song or the previous song. As long as this pin pulls the power, it will change. Song, which is used in high-end music collections, can automatically change songs.
Okay, let’s just talk about these in a nutshell. For more specific information, search for: “musical film”, “voice chip”, etc. to look up other information. Hope it helps you. There is information available at the link below.