Morse Code Recognition


The «Morse Code Recognizer» service is designed to recognize an audio file and return the result in Morse code. The recorded or uploaded audio file containing the sounds of Morse code is fed to the input of the service. The file is processed by the service algorithms and gives the user Morse code in the result field in the «-*** * *-** *- *-* **- *** -**-» form where the «-» symbol denotes the usual long element of the alphabet – «dash», and the «*» symbol denotes the short element – «dot».

Key terms and concepts

Morse code is an encoding method where letters of the alphabet, numbers, punctuation marks, and other symbols are represented as sequences of short and long signals called dots and dashes.

Practical value

The service can be used to simplify the work with the recognition of audio files containing Morse code elements. It may allow recording of raw data and checking the quality of transferred elements.

External interface

The external service interface is shown in Figure 1.

Figure 1. External interface of the «Morse Code Recognition» service

The interface contains the following areas:

  • «Examples» – a field that allows the user to see the work of the service on pre-recorded audio files with Morse code elements (Figure 2).
  • «Record» – a field that allows the user to write a file with Morse code elements from the device and then recognize it in text encoding (Figure 3).
  • «Upload file» – a field where you can upload a previously recorded audio file with its subsequent recognition (Figure 4).
  • «Result» – a field where the result of the service is displayed to the user (Figure 5).

Figure 2. The «Examples» field in the «Morse code recognition» service interface

Figure 3. The «Record» field in the «Morse code recognition» service interface

Figure 4. The «Upload file» field in the «Morse code recognition» service interface

 

Figure 5. The «Result» field in «Morse Code Recognition» service interface

Service user script

Script 1: Convert recorded audio file to Morse code

  1. Record an audio file for recognition using the «Record» button.
  2. Press the «Run» button to get the result.

Script 2: Convert uploaded audio file to Morse code

  1. Select a custom audio file using the «Select» button to upload to the service.
  2. Press the «Upload» button and get the recognition result in the form of Morse code.

Service access via API

To access the service via API, you need to send a “POST” request to the address https://www.corpus.by/MorseDecoderPy/api, in which you need to specify the path to the WAV audio file containing the audio interpretation of the Morse code for recognition in the format {“audio”: open(“path/to/the/file”, ‘rb’)}

Request example:

response = requests.post(“https://www.corpus.by/MorseDecoderPy/api”, files={“audio”: open “D:\Work_Projects\zvuk6.wav”, ‘rb’)} “, “rb”)})

 

To get text information in Morse code, you need to use the command:

response.text

 

The server will give you back:

Morse code text (Figure 6)

Figure 6. An example of making a request to the service API

References

The «Morse Code Recognition» service page: https://www.corpus.by/MorseDecoderPy/?lang=en

If you have found a spelling error, please, notify us by selecting that text and pressing Ctrl+Enter.

Leave a comment

Your email address will not be published.