I have a Baofeng speaker mic repurposed just for a microphone. There are two ways to use the speaker. One is to get a microphone connector with enough pins for mic, PPT, gnd and spkr., what I have done for one radio, so that I can use a standard CB microphone, is to put a "pigtail" for the speaker long enough to plug into the speaker jack. Looks a little odd, but works fine. I do this, as I have stereo mic jack (ptt, mic, gnd) that is wired to be compatible with my Xiegu X1M, so that I can swap microphones and also use my digital jumper cable that I made up for the X1M to use with a SignaLink USB interface.
73 /paul W3FIS