There is a graphite lube made just for speedo cables, comes in a little squirt bottle. Undo cable at speedo, and squirt entire bottle into cable. Works great, better than engine oil IMO. Have a towel to cover the carpet so don't risk a mess. Napa or any parts house should have the cable lube.
If your more of a purist, undo the speedo end of the cable, then undo the trany end, and pull the flexible cable completely out of the housing. Clean the cable real good, lather it with half the bottle of cable lube, then squirt the remainder in the speedo end of the housing as mentioned earlier.