Morse code decoding library

Overview

ggmorse

Actions Status License: MIT ggmorse badge

Morse code decoding library

ggmorse2.mp4
ggmorse0.mp4
ggmorse1.mp4

Try it out

You can easily test the library using the free GGMorse application which is available on the following platforms:

Download on the App Store Get it on Google Play

Simply start the application and place your phone near speakers or radio that plays some Morse code. The speed and frequency of the transmission will be detected automatically by the application and you should be able to see the decoded text in real-time.

Browser Demo: https://ggmorse.ggerganov.com/

Details

The library decodes Morse code transmission in real-time from raw audio captured via microphone.

  • Automatic pitch detection: [0.2, 1.2] kHz
  • Automatic speed detection: [5, 55] WPM

Todo

The current library implementation is not very user-friendly when it comes to using it in external projects. Still, if you want to try using it in your project and have trouble in getting it to work, let me know and I can try to help you.

The next version of the library would be in a much better state. These are the things I want to improve before releasing v0.2.0:

  • Improve the C and C++ interface
  • Add tests
  • Add examples
  • Reduce memory allocations
  • Clean-up the algorithmic part

Depending on the level of interest this gets, I can also provide various language bindings, similar to ggwave.

Building

Dependencies for SDL-based examples

[Ubuntu]
$ sudo apt install libsdl2-dev

[Mac OS with brew]
$ brew install sdl2

[MSYS2]
$ pacman -S git cmake make mingw-w64-x86_64-dlfcn mingw-w64-x86_64-gcc mingw-w64-x86_64-SDL2

Linux, Mac, Windows (MSYS2)

# build
git clone https://github.com/ggerganov/ggmorse --recursive
cd ggmorse && mkdir build && cd build
cmake ..
make

# running
./bin/ggmorse-gui

Emscripten

git clone https://github.com/ggerganov/ggmorse --recursive
cd ggmorse
mkdir build && cd build
emcmake cmake ..
make
Comments
  • cmake error

    cmake error

    Using Ubuntu 21.10. When I run the "cmake .." instruction I get the following errors:

    CMake Error at examples/third-party/imgui/CMakeLists.txt:91 (add_library): Cannot find source file:

    imgui/examples/libs/gl3w/GL/gl3w.c
    

    Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm .hpp .hxx .in .txx

    CMake Error at examples/third-party/imgui/CMakeLists.txt:15 (add_library): Cannot find source file:

    imgui/imgui.cpp
    

    Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm .hpp .hxx .in .txx

    CMake Error at examples/third-party/imgui/CMakeLists.txt:91 (add_library): No SOURCES given to target: imgui-sdl2

    CMake Error at examples/third-party/imgui/CMakeLists.txt:15 (add_library): No SOURCES given to target: imgui

    CMake Generate step failed. Build files cannot be regenerated correctly.

    What am I missing?

    opened by FastThenLeft 4
  • Can't scroll the settings dialog.

    Can't scroll the settings dialog.

    Ubuntu 21.04, GGMorse v1.3.4

    I can't scroll the settings dialog. Extending the window on my 1920x1080 monitor is just barely long enough to get to the bottom.

    I noticed the browser version has the same issue.

    BTW, thanks for this app! I LOVE it! I'm doing S&P on the ARRL DX contest with it, and it works perfectly!

    opened by FastThenLeft 3
  • Not receiving from morsecode.tools

    Not receiving from morsecode.tools

    Hi!

    Saw you post on HackerNews, and only now got the time to respond.

    I too have a tiny PWA for transmitting Morse Code: https://morsecode.tools/

    Haven't had much luck transmitting to your webapp. I see you transmit at 550 Hz, though setting that on my side I didn't have any luck. Any tips?

    Also, I noticed when transmitting on the webapp on a mobile, the on-screen keyboard does not appear for both Firefox and Chrome.

    opened by sime 2
  • feature request: support for multi-character constants

    feature request: support for multi-character constants

    I tried to update the code to support the full international morse code standard with what I thought were single characters (minus CH) to the unordered map kMorseCode in ggmorse.cpp, but I got multi-character character constant warnings when compiling and bigger problems when running. Perhaps this is why you left these out to begin with. The symbols in question, some which are shared by other non-latin symbols and pose another interesting issue, are:

        { "0101",    'Ä',  },
        { "01101",   'À',  },
        { "1111",    'CH', },
        { "00100",   'É',  },
        { "11011",   'Ñ',  },
        { "1110",    'Ö',  },
        { "0011",    'Ü',  },
    

    I tried converting the unordered map to strings instead of characters, but it just turned into a big mess. I'm thinking that's the way it probably should be though in order to fully support all possibilities.

    opened by grkblood13 2
  • issues with running make install

    issues with running make install

    Running make install doesn't install libggmorse-common-sdl2.so and libimgui-sdl2.so. Additionally the example executables don't get placed in /usr/local/bin (if they even should?).

    The following will fix all of this but you probably have a much cleaner way of doing this.

    # build install (optional)
    sudo make install
    sudo cp examples/libggmorse-common-sdl2.so /usr/local/lib
    sudo cp examples/third-party/imgui/libimgui-sdl2.so /usr/local/lib
    sudo cp bin/ggmorse-* /usr/local/bin
    cd /usr/local/bin
    sudo patchelf --set-rpath /lib:/lib64:/usr/local/lib ggmorse-*
    
    opened by grkblood13 3
  • feature request: command line version that outputs decode

    feature request: command line version that outputs decode

    A command line executable of this that accepted an audio file and outputted a decode to either stdout or to a file would be awesome.

    Another nice to have would be the ability to have a lookup table that you could pair codes to characters for different languages.

    enhancement 
    opened by grkblood13 4
Owner
Georgi Gerganov
Georgi Gerganov
Telepati 2 Nov 29, 2021
RLE-encoding/decoding for files in C

RLE-encoding RLE-encoding/decoding for files in C My version of file encoding/decoding as an assignment for Metropolia UAS in C-programming course . T

Vasily Davydov 3 Aug 26, 2022
Protocol Buffers with small code size

Nanopb - Protocol Buffers for Embedded Systems Nanopb is a small code-size Protocol Buffers implementation in ansi C. It is especially suitable for us

null 3.3k Dec 31, 2022
Google Protocol Buffers tools (C code generator).

About Google Protocol Buffers tools in Python 3.6+. C source code generator. Rust source code generator ( ?? ?? ?? under construction ?? ?? ?? ). prot

Erik Moqvist 51 Nov 29, 2022
Macesuted's Code

Macesuted's Code 这里存放了自 2021-5-1 以来我在学习 OI 过程中于各大 OJ 所做题目的 AC 代码。 仅供个人学习参考使用,请不要直接复制这些代码以 AC 对应题目,转载请注明出处。 我的 个人博客 中包含部分题目的题解。 我在这些 OJ 上的帐号: AtCoder:

Macesuted 25 Dec 19, 2022
A fast, byte-code interpreted language

Minima Minima is a small, portable, and fast programming language written in C. The Syntax Minima's syntax is optimized for a fast byte-code translati

null 43 Aug 16, 2022
Your binary serialization library

Bitsery Header only C++ binary serialization library. It is designed around the networking requirements for real-time data delivery, especially for ga

Mindaugas Vinkelis 771 Jan 2, 2023
Cap'n Proto serialization/RPC system - core tools and C++ library

Cap'n Proto is an insanely fast data interchange format and capability-based RPC system. Think JSON, except binary. Or think Protocol Buffers, except

Cap'n Proto 9.5k Jan 1, 2023
A C++11 library for serialization

cereal - A C++11 library for serialization cereal is a header-only C++11 serialization library. cereal takes arbitrary data types and reversibly turns

iLab @ USC 3.4k Jan 3, 2023
Header-only C++11 library to encode/decode base64, base64url, base32, base32hex and hex (a.k.a. base16) as specified in RFC 4648, plus Crockford's base32. MIT licensed with consistent, flexible API.

cppcodec Header-only C++11 library to encode/decode base64, base64url, base32, base32hex and hex (a.k.a. base16) as specified in RFC 4648, plus Crockf

Topology 491 Dec 28, 2022
FlatBuffers: Memory Efficient Serialization Library

FlatBuffers FlatBuffers is a cross platform serialization library architected for maximum memory efficiency. It allows you to directly access serializ

Google 19.7k Jan 9, 2023
FlatBuffers Compiler and Library in C for C

OS-X & Ubuntu: Windows: The JSON parser may change the interface for parsing union vectors in a future release which requires code generation to match

null 550 Dec 25, 2022
Simple C++ 20 Serialization Library that works out of the box with aggregate types!

BinaryLove3 Simple C++ 20 Serialization Library that works out of the box with aggregate types! Requirements BinaryLove3 is a c++20 only library.

RedSkittleFox 14 Sep 2, 2022
A C++ library for interacting with JSON.

JsonCpp JSON is a lightweight data-interchange format. It can represent numbers, strings, ordered sequences of values, and collections of name/value p

null 6.9k Jan 4, 2023
A header only C++11 library for parsing TOML

tinytoml A header only C++11 library for parsing TOML. This parser is based on TOML v0.4.0. This library is distributed under simplified BSD License.

mayah 157 Dec 22, 2022
cpptoml is a header-only library for parsing TOML

cpptoml A header-only library for parsing TOML configuration files. Targets: TOML v0.5.0 as of August 2018. This includes support for the new DateTime

Chase Geigle 561 Dec 28, 2022
A C++11 or library for parsing and serializing JSON to and from a DOM container in memory.

Branch master develop Azure Docs Drone Matrix Fuzzing --- Appveyor codecov.io Boost.JSON Overview Boost.JSON is a portable C++ library which provides

Boost.org 333 Dec 29, 2022
Zmeya is a header-only C++11 binary serialization library designed for games and performance-critical applications

Zmeya Zmeya is a header-only C++11 binary serialization library designed for games and performance-critical applications. Zmeya is not even a serializ

Sergey Makeev 99 Dec 24, 2022
CppSerdes is a serialization/deserialization library designed with embedded systems in mind

A C++ serialization/deserialization library designed with embedded systems in mind

Darren V Levine 79 Nov 5, 2022