What's the question exactly? Are you looking to write a program to decide Morse or use something already existing?
If the latter check out fldigi. There are also a bunch of open source ham radio projects on GitHub that have cw decode you could lift.
Good luck!