The "Morse Expert" App available for Android/iOS does a pretty good job of decoding CW 'in the wild'. It can adapt to different sending speeds and does a decent job with non-ideal character/element spacing.
The decoding algorithm uses some amount of Bayesian probabilities to decide what the proper decoding of the incoming signal is: http://ag1le.blogspot.com/2013/01/towards-bayesian-morse-dec...