From the other comments, it could be a novelty hat that speaks or makes a sound effect when the button is pressed. I’m curious to find out what the original sound would have been!
Quick question: Where does the battery go? Is it the corroded part in the first internals image, or was that the button?
Ah hah, I see it now