Ben's notes

Linux, Unix, network, radio...

User Tools

Site Tools


Action disabled: revisions
anki_morse_code

Practice Morse code words with Anki

This is an experiment in training Morse code using Anki, an open source flashcard app. Free for Windows, Linux, Mac and Web. This page is based on a Ubuntu 20 LTS install.

Quote from the Anki Documentation: There are two simple concepts behind Anki: ‘active recall testing’ and ‘spaced repetition’. They are not known to most learners, despite having been written about in the scientific literature for many years. Understanding how they work will make you a more effective learner.

If you are interested in the science behind this, I really recommend the book: 'Make It Stick'.

Try it

Here you can download Anki Deck exports to try it out yourself.

Install

  • Install Anki using the package manager, or download latest binary from the Anki website.
    # via package manager:
    sudo apt install anki
    
    # via download from website:
    sudo apt install mplayer
    tar xf anki-2.1.38-linux.tar.bz2
    cd anki-2.1.38-linux
    sudo ./install.sh
    
    
  • Start Anki and create a new Deck.

Generate Morse audio files

  • Example script:
    #!/bin/bash
    set -e
    
    # Needs ebook2cw; sudo apt install ebook2cw
    
    
    # One word per line in a file.
    words="nl-top-500.txt"
    
    # Output directory
    output_dir="output"
    
    # File that you can import with Anki
    anki_export="${output_dir}/anki.txt"
    
    echo "# import this file with Anki" > "${anki_export}"
    
    if [[ ! -d "${output_dir}" ]]; then
    	mkdir "${output_dir}"
    fi
    
    cat "${words}" | while read word
    do
    	# generate morse audio files
    	echo "${word}" | ebook2cw -w 25 -f 600 -a CALLSIGN -t "${word}" -y 2021 -o "${output_dir}/${word}"
    
    	# generate Anki export
    	echo "[sound:${word}0000.mp3]; ${word}" >> "${anki_export}"
    
    	echo "${word}"
    done
  • Copy all output/*.mp3 files to your collection.media directory. You can find that directory with:
    find ~ -type d -name "collection.media"
  • For other OS's find the collection.media subdirectory below:
    Windows: %APPDATA%\Anki2
    Mac: ~/Library/Application Support/Anki2

Import cards

  • Open you new Morse Deck.
  • Go to File→Import…
  • Select output/anki.txt
  • Click Import button.

Studying

  • You can click 'Study Now' to start studying. You can also change the schedule, study more cards, randomize etc. Read the Anki Documentation here: https://docs.ankiweb.net/#/
  • Keyboard Shortcuts (mouse over buttons for most shortcuts). From the manual: When studying, either space or enter will show the answer. When the answer is shown, you can use space or enter to select the Good button. You can use the 1-4 keys to select a specific ease button. Many people find it convenient to answer most cards with space and keep one finger on 1 for when they forget.
  • r repeat audio.
anki_morse_code.txt · Last modified: 2021/01/13 06:20 by admin