I am trying to decode Morse code from an audio (wav) file. Here is the technique I am using to detect the presence of the signal:
I have a window of size (sampling_freq/tone), where tone is the frequency of the Morse code tone, as determined by the fft (most prominent tone). I move this window across the entire recording, and for each window location, I detect if there is any signal above a user-defined threshold by checking the samples in that window (sample freq is 11025, tone is 981 Hz.)
This pretty much works, giving dots and dashes where they should appear. HOWEVER: these dots and dashes are not solid; if I zoom in, there are lots of empty spaces which make it difficult (impossible?) to determine where the real dots and dashes are.
How can I fix this, or is there a better approach?
EDIT: I am detecting where dots and dashes are as: when I detect a signal in the window, I make all the entries in a corresponding output array '1' for that same window.