I'd suspect the speedo sensor in the hub (or damage to the cable from it) before anything else.
Did this start after having the front wheel off for a tyre change, for example? If the plastic gear that engages with the wheel isn't in the right place when it goes back on it'll break and you could end up with this sort of symptom.