I am using a crystal to transmit morse codes, and I am using Kenwood radio receiver to obtain the signal. It receives the signal with a lot of noise, though we can figure out the morse code sound. I want to convert this signal into a series of 0s and 1s so that i can use a code to convert the signal to human readable text.

Can someone please help, or should I use some other alternative to convert the noisy morse code sound file into decoded text file, please suggest.

NOTE:- I do want to know the steps behind, so that i can write the code myself.

  • $\begingroup$ Hi Manish, welcome to the Amateur Radio Stack Exchange. I'd like to ask a clarifying question to help you get a more useful answer. Are you looking for an existing software program that can decode a Morse code transmission, or are you interested in learning how to write that program yourself? $\endgroup$
    – mtrberzi
    Commented Sep 30, 2014 at 15:58
  • $\begingroup$ Oh thanks, actually i want to know both, so that after learning i have something to crosscheck with. $\endgroup$
    – Manish
    Commented Sep 30, 2014 at 16:00
  • $\begingroup$ A small bit of advice: The main problem for 'machine decoding' Morse code is tha fact that, in between signs, no carrier is present. Noise can then confuse your algorithm. The single most important problem is to distinguish between noise and signal. The actual decoding isn't that complicated. $\endgroup$
    – jcoppens
    Commented Oct 5, 2014 at 18:10

1 Answer 1


If you would like to decode Morse code with an existing program:

My personal recommendation is Fldigi, which is a software modem that runs on most major operating systems, including Windows and Linux. Fldigi has a modem for "CW" (Continuous Wave), which can both send and receive Morse code. The program uses your sound card to communicate with your radio. To receive and decode Morse code, you would connect your receiver's audio output to your computer's microphone port. Then Fldigi will be able to listen to the Morse code sounds and can decode the transmission for you.

If you would like to write your own program to decode Morse code:

You will need to read about some digital signal processing techniques to do this. Ultimately there are a few different ways to approach the problem. Let's assume you already have some way of getting audio from your receiver into your computer (maybe you have pre-recorded some transmission and saved it to disk, or maybe you are doing this in real time by reading sound input data).

Your first goal is to implement some kind of algorithm to detect the presence or absence of the carrier frequency (which is being turned off and on in order to send Morse code). You should learn about something called the Discrete Fourier Transform (DFT); this online textbook is a lot of material, but if you are interested in digital signal processing and working with radio or audio signals on your computer, you will get a lot out of it.

A simple explanation of the DFT is that it takes a sequence of audio samples and tells you the amplitude (and phase) of certain frequencies of your signal. For your application, you can calculate the DFT over your sample buffer and then look for the output value that corresponds to the frequency of the Morse code tone. If the value corresponds to a large amplitude then you know the carrier frequency was present in your sample. If the value you see corresponds to a small amplitude then the carrier was not present. This will allow you to detect the Morse code sound.

A simpler way to do this is the Goertzel algorithm. The Goertzel algorithm is essentially a single tone detector. It calculates only one frequency component of the DFT. If you know ahead of time what the audio frequency of your Morse code tone will be, you can implement a Goertzel filter that will detect the presence or absence of that tone (as illustrated in this white paper). However this is a more advanced way to do it, although it is more efficient.

Once you have detected the presence or absence of the Morse code sound, you will need an algorithm to figure out whether a dot or a dash is being sent. One algorithm to do this is that used by the RSCW program. The disadvantage of this algorithm is that it does not tolerate poorly sent code. It will do well when detecting Morse code that is sent by a machine, but humans cannot send with perfect timing and so this algorithm may not do well. However it is a place to start and maybe you will think of some ways to improve it, or come up with something yourself depending on the results you get from the carrier detection step.

Writing a Morse decoder from scratch is challenging, especially if you have never done digital signal processing before. However it is a rewarding experience and will teach you a lot about DSP and integrating software with radio. If you have some programming experience, you should not have any trouble finding libraries for audio input and DFT in your favourite language.

  • $\begingroup$ Just so you don't waste your time -- I wrote a Morse code decoder from scratch with Python. I have had a signals class, and I am a decent programmer, and I still found the task very daunting. My final product has trouble with noisy signals, and many over the air signals are noisy. $\endgroup$ Commented Oct 2, 2014 at 7:59
  • $\begingroup$ There's an Arduino project that has some similarities to this overview, so you might find it an interesting example implementation. Like this answer, it also has a good summary of how the decoding is accomplished: github.com/nicolacimmino/MorseDecoder $\endgroup$ Commented Jul 28, 2015 at 19:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .