I have a radio receiver. That radio's sound output goes to my computer. The sound output contains morse code on or about 440 Hz. That morse code could range in speed from 2 to 20 WPM. I sort-of know how to figure out whether the other station is transmitting, but how do I take that transmitting/not transmitting state and turn it into text? I thought there might be a better solution than brute force.
Complicating factors:
- I want the program to be able to figure out how fast the other station is transmitting rather than it being specified by the user as in most morse-code programs.
- There is noise
- Morse code transmitters don't turn on and off instantly. There is a rise and fall time on the order of 4 milliseconds.
- Much of this morse code is sent by people, and is thus not perfect:
- For instance, a pause between words is supposed to by 7 elements, but it could be anything from 5 to 8.
- A persons sending speed could vary by about 20% in a single conversation
- I want to do this in more-or-less real time. It's ok if the program outputs something, realizes it's a mistake, and corrects it.
Example output of program so far. It can resolve the audio into keyed/not keyed, but resolving that into dots/dashes is not working.
###########################################################__________________________
_________________________________####################################################
#####################################################################################
#######################################______________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_________________________
Any code/suggestions on the thing that determines transmitting/not transmitting and/or the section that resolves that to morse code would be appreciated.