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!
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
.wavfile 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 is700.--dot_duration: The duration of a dot in milliseconds. Default is100.
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
612c75bae3bf956b38c8f63f1d0c8a7ab8d65d103f2674881443cb274032456d
|
|
| MD5 |
9d2c4e00ffcd0495dec1e0b79efc5795
|
|
| BLAKE2b-256 |
43b33afae83cb40ea2aea51874fe4af08372d872520e9f612c93ee2bfbc18936
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c6bee581dcf0a336bb207a9d606568b31fe594cc2c8513fd6c1f44385a8a655
|
|
| MD5 |
abd250f5c7f502e618150442f81c1111
|
|
| BLAKE2b-256 |
9adf4d7a83b859659fdf71569de9d95ced8d5dd4896a4e8695ca15937d4badc3
|