Just an educated guess, but the square socket portion of the plastic drive gear in the tranny is probably stripped. This causes the cable to skip, and results in an erratic speedo reading.
An easy fix is to remove the drive pinion from the trans, and fill the square hole with epoxy. Grease the square end of the speedo cable with silicone grease, such as dielectric, and while the epoxy is setting insert it in the pinion gear. After it fully cures, remove the cable, and you should have a nicely refurbished socket for the cable to go into. Lube the cable with some spray lithium grease, reinstall everything, and motor on.
Jeff