morse-mp3

0.2.5 • Public • Published

morse-mp3

convert text to morse audio

To use in CLI:

npm install -g morse-mp3

morse-mp3 [optional filename] [string to convert]

For example:

morse-mp3 "hear this text" will play "hear this text" in OSX. It might work on windows too (untested).

morse-mp3 morse.mp3 SOS will save SOS in morse to morse.mp3 and play it

To use in a library:

npm install morse-mp3

morseToMp3 = require('morse-mp3')

morseToMp3.convert(textToConvert, exportFile)

For example:

exportFile = path.join(__dirname, 'morse.mp3');

morseToMp3('SOS', exportFile)

to convert "SOS" to morse and then save it in the script's directory under morse.mp3

Additional Info:

Change the short, long, and silent .mp3 files in order to change the sound and time used for the tones (e.g. if you want to add a background noise or change the length of time each sound is held for).

The space between letters is silent.mp3 played once, the space between words is silent.mp3 played 3 times.

Made for use in HackDFW's 2016 morse minigame

License:

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i morse-mp3

Weekly Downloads

0

Version

0.2.5

License

MIT

Last publish

Collaborators

  • cyrusroshan