Skip to main content

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.

Metadata

Release files for morse-to-audio 1.5.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for morse-to-audio 1.5.1
File Size Uploaded
morse_to_audio-1.5.1.tar.gz 3.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for morse-to-audio 1.5.1
File Interpreter ABI Platform
morse_to_audio-1.5.1-py3-none-any.whl Python 3 none any Details

Total release size: 7.4 kB

Release files / morse_to_audio-1.5.1.tar.gz

Download URL morse_to_audio-1.5.1.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
612c75bae3bf956b38c8f63f1d0c8a7ab8d65d103f2674881443cb274032456d
BLAKE2b-256 checksum
How to use checksums
43b33afae83cb40ea2aea51874fe4af08372d872520e9f612c93ee2bfbc18936
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.12

Release files / morse_to_audio-1.5.1-py3-none-any.whl

Download URL morse_to_audio-1.5.1-py3-none-any.whl
Size 3.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2c6bee581dcf0a336bb207a9d606568b31fe594cc2c8513fd6c1f44385a8a655
BLAKE2b-256 checksum
How to use checksums
9adf4d7a83b859659fdf71569de9d95ced8d5dd4896a4e8695ca15937d4badc3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.12

Release history Release notifications | RSS feed

This release

1.5.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page