Giter Site home page Giter Site logo

morse's Introduction

morse.py

Python program to translate text to audio morse code

pip install pyaudio (and its dependencies that it complains about)

morse.py string to encode

The program will then sit and wait as you try to type in what you heard

± ./morse.py this is a test
this is a test
Correct: this is a test

Edit the top of the program to set the morse code play back parameters. You can effect the side tone, the WPM and the farnsworth spacing.

You can change the intra-letter spacing and the intra-word spacing.

If you're just learning morse code, try to keep the MORSE_UNIT at .1 (which feels like 20wpm to me) but increase the WORD_SPACE and LETTER_SPACE to give you some room to decode. (This is the farnsworth method)

MORSE_UNIT = .1
DIT = MORSE_UNIT
DAH = MORSE_UNIT*3
LETTER_SPACE = MORSE_UNIT*3
WORD_SPACE = MORSE_UNIT*7-LETTER_SPACE
TONE = 550

words.py:

Pick words of MAX_LETTERS from bogwords.txt and play a random SET using morse.py to test your skills

edit words.py to change MAX_LETTERS and SET:

SET=3
MAX_LETTERS=4
± ./words.py
rump
Correct: rump
wont
Correct: wont
wish
Correct: wish
aver
Correct: aver
rood
Correct: rood
surf
Try Again: serf
tao
Correct: tao
take
Correct: take
have
Try Again: shin
hoae
Try Again: hone
mob
Try Again: job
mare
Correct: mare
face
Correct: face

Try Again: star
emit
Correct: emit

attribution:

Waveform Generator taken from: https://stackoverflow.com/a/53231212/7503114 (Thanks!)

morse's People

Contributors

temporarilyoffline avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.