In my experience I have found speedo cables needing to be lubed and rust in the speedo head itself...
Easy to lube the cable, the grease gets dry and the inner drive springy wire can jump around a bit till the lube warms up or becomes smooth.
When the speedo head gets rusty it allows the metal drum to come in contact with the magnets. Should be no contact at all - I'm sure you can find more info about the inner workings of a speedo.
When this happens you may be able to hear a tinging or slight bell like sound as the speedo jumps around.
Hope this helps a bit,
Bob