You will have to get to the inside of the speaker. Those are usually held in with a nut on the inside. The wire will be soldered to the terminal. You will have to unsolder a wire probably. It is possible that the terminal was molded or pressed into the plastic. That would be much more difficult to replace. But you have to see what is on the inside of the plastic to determine the next step. The plastic might be welded, which means you won't be able to fix it.