Like Tim said, a sticking cable in the sheath would be an easy fix. If it is inside the speedometer itself, then you would probably need to replace. I have done some work inside the speedometer head and it is very delicate construction with small pieces. There is no direct connection between the speedometer drive and the speed indicator; a magnet spins inside a metal cup that pulls the needle against a small spring (the odometer though is direct drive). Clean and relube the drive shaft and hope it fixes it. Good luck.
Lee.