Here is what I did. Unfasten the cable at the wheel,and pull the whole inner cable out. I then oiled it down pretty good, and wiped it clean. Then I wiped a thin coat of oil all over it, and slid it back into the housing. Make sure it drops int the speedometer. You will feel it when it does. Re-hook the cable up at the wheel, and go enjoy your peaceful ride
Depending on how-long the squeal has been there, it also makes sense to try to clean-out the metal helix (the cable housing) by at-least flushing it w/some WD-40, CRC or mineral spirits. If the drive cable comes-out w/difficulty or when you remove it, it's dry and rusty with 'powder' coming-off on your hands, you need to clean/flush the cable and housing both. From working on my bicycles I know that a bit of rust in the cable housing will interfere w/the cable free operation, and may cause your cable to bind, which could cause the inner drive cable to fail, in a worst-case. That said, in 40+ years of wrenching on my rides, I've only had one drive cable fail.
I've seen where a needle will 'jump' erratically from a dry housing and cable as the gauge works, due-to a dry or corroded cable & housing.
I usually use general-purpose grease or wheel bearing grease, smeared-liberally along the cable, after using some solvent to clean it, and then reinsert the cable.
It may seem evident or a simple thing, but for someone who isn't mechanically-inclined, you may have to rotate the drive cable a bit to get it to insert in the female on the mechanical drive for the speedo by the front wheel axle, or the speedo housing on the other end, at the instrument (the gauge).
I always use a pair of slip-joint pliers to snug-up the knurled cable end into the front wheel drive to prevent its loosening.