
The dit and dah thresholds appear in dashed lines of their respective colors. In practice having the peak close to the line is good enough. The corresponding bin in the histogram is at the right of the line so ideally the peak should appear at the right of the line. The ideal position of the dits (17) and dahs (32) is displayed with a red and yellow line respectively. The decoder is based in splitting lengths into these 3 areas with:
Garbage which consists mainly in residual amplitudes of elements not present. So to reset counts you may just move the WPM slider (D.1) back and forth.Ĭlearly there are 3 accumulations from lower to higher (left to right): It is reset at every audio input rate or WPM change. This is the histogram of element lengths over the length of one character. The decoded text from Morse audio appears here H: Element length histogram A calibrated 13 WPM signal has been used when taking the screenshot so this is the kind of envelope one should be aiming at. The part of envelope between the red bars in (E) is displayed here. The red bars delimit the zoomed view shown in F F: Zoomed envelope The ☑ bins surrounding the peak bin are also considered (summed up).
Envelope is obtained from the bin of FFT size shown in (I.3) where lies the peak detected by the peak detector (see C). This is the time line of the detected envelope. D.2: ThresholdĪdjust the value in dB for peak detection. Most amateur radio transmission are done with a WPM around 22~27. When decodes start to flow the histogram (H) populates and also give an idea of the right setting of WPM. Yhe optimal length for a dit is 7.69 so the base of a dit pulse should fit in a 10 samples interval. You can get help from the envelope signal zoom (F).
#Best morse decoder code#
Use this slider to adjust the Morse code speed in Words Per Minute. The detected peak frequency along with its magnitude in dB is displayed in the legend below the x axis D: Controls This is the output of the 16k FFT used to find the frequency of the signal peak. This time line display shows the amplitude of the audio signal C: Spectrum peak detection As much as possible the 8000 S/s sample rate should be selected or its nearest value.
2: Select sample rate among available sample rates for device. An audio input must be selected for the program to work. The "Device" menu item opens a dialog to choose the Audio input. Just contains the "Exit" item to quit application Audio The Neural Network weights are taken from models/default.model you must make sure this file is present. Firstly create and activate a virtual environment: You will need Python3 and virtualenv installed in your system. This is the main application folder containing morseangel.py and its dependencies Start Please check the readme.md file in the notebooks folder for more information. It contains all notebooks from early stage to more elaborated models. This folder contains development Jupyter notebooks. I hope the present materials can serve as a base.ĭetails on the Neural Network (NN) are given in paragraph H of the Usage section. However this is Open Source and contributors are welcome to continue the work and bring enhancements. I cannot spend much more time on this since I already dedicated a lot of time to reach this point. Its purpose is to decode Morse code from the sound coming from an audio device.Īt this stage the model (and thus the "program") shows signs of working although has room for improvement. This is a Python3 application Based on PyQt5 for the GUI and PyTorch for the Deep Neural Network.