2023-02-20 17:16:11 +00:00
|
|
|
# pycw
|
|
|
|
|
2023-02-26 17:27:58 +00:00
|
|
|
![Project Version](https://img.shields.io/pypi/v/pycw) ![Python Version](https://img.shields.io/pypi/pyversions/pycw)
|
|
|
|
|
2023-02-23 13:02:28 +00:00
|
|
|
Python Morse Code Generator
|
|
|
|
|
|
|
|
Generate Morse Code (CW) audio files in Python.
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
```
|
|
|
|
optional arguments:
|
|
|
|
-h, --help show this help message and exit
|
|
|
|
-i INPUT, --input INPUT
|
|
|
|
Input text file (defaults to stdin)
|
|
|
|
-t TEXT, --text TEXT Input text. Overrides --input.
|
|
|
|
-s SPEED, --speed SPEED
|
|
|
|
Speed, in words per minute (default: 12)
|
|
|
|
-n TONE, --tone TONE Tone frequency, in Hz (default: 800)
|
|
|
|
-v VOLUME, --volume VOLUME
|
|
|
|
Volume (default: 1.0)
|
|
|
|
-r SAMPLE_RATE, --sample_rate SAMPLE_RATE
|
|
|
|
Sample rate (default: 44100)
|
|
|
|
-o OUTPUT, --output OUTPUT
|
|
|
|
Name of the output file
|
|
|
|
```
|
|
|
|
|
|
|
|
Or `import pycw` and then use functions in your code, for example:
|
|
|
|
|
|
|
|
```
|
|
|
|
import pycw
|
|
|
|
|
2024-09-24 14:12:23 +00:00
|
|
|
pycw.output_wave("Intro.wav", "CQ CQ CQ DE BD8CMN BD8CMN BD8CMN PSE K", 20)
|
2023-02-23 13:02:28 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Then you can get a output file called `Intro.wav` in your working directory.
|