Skip to main content

The **Morse-to-Audio** project converts Morse code into audio files. Users can input Morse code (using dots, dashes, and spaces), and the program generates an audio output in `.wav` format. The project allows customization of tone frequency and dot duration for flexibility.

Project description

Morse to Audio


try our demo in spaces!

open in hf


A simple Python package that converts Morse code into an audio file. This tool supports customizable frequencies and dot durations to generate Morse code tones.

Features

  • Convert Morse code (., -, and spaces) into audio.
  • Customize the tone frequency and dot duration.
  • Outputs a .wav file of the generated Morse code audio.

Installation

You can install the package using pip:

pip install morse-to-audio

Usage

Once installed, you can use the morse-to-audio command in your terminal to convert Morse code to audio:

morse-to-audio ".- .- -" --frequency 700 --dot_duration 100

Arguments

  • morse_code: The Morse code to convert. Use . for dots, - for dashes, and spaces between words.
  • --frequency: The frequency of the tone in Hz. Default is 700.
  • --dot_duration: The duration of a dot in milliseconds. Default is 100.

Example

morse-to-audio "-- .- -." --frequency 750 --dot_duration 120

This will generate a .wav file with the Morse code for "MAN" and save it to your system.

How It Works

The package uses the pydub library to generate sine waves representing the Morse code tones. Each dot, dash, and space is converted into an audio segment and combined into a final output file.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

morse_to_audio-1.5.1.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

morse_to_audio-1.5.1-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file morse_to_audio-1.5.1.tar.gz.

File metadata

  • Download URL: morse_to_audio-1.5.1.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for morse_to_audio-1.5.1.tar.gz
Algorithm Hash digest
SHA256 612c75bae3bf956b38c8f63f1d0c8a7ab8d65d103f2674881443cb274032456d
MD5 9d2c4e00ffcd0495dec1e0b79efc5795
BLAKE2b-256 43b33afae83cb40ea2aea51874fe4af08372d872520e9f612c93ee2bfbc18936

See more details on using hashes here.

File details

Details for the file morse_to_audio-1.5.1-py3-none-any.whl.

File metadata

  • Download URL: morse_to_audio-1.5.1-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for morse_to_audio-1.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2c6bee581dcf0a336bb207a9d606568b31fe594cc2c8513fd6c1f44385a8a655
MD5 abd250f5c7f502e618150442f81c1111
BLAKE2b-256 9adf4d7a83b859659fdf71569de9d95ced8d5dd4896a4e8695ca15937d4badc3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page