forked from dj1yfk/ebook2cw
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ebook2cw.1
156 lines (113 loc) · 4.86 KB
/
ebook2cw.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
.TH ebook2cw 1 "AUGUST 2023" Linux "User Manuals"
.SH NAME
ebook2cw \- Convert ebooks to Morse code audio files (MP3/OGG)
.SH SYNOPSIS
.B ebook2cw
[OPTIONS] [INFILE]
.SH DESCRIPTION
.B ebook2cw
ebook2cw is a command line program which converts a plain text ebook to Morse
code audio files. It works on several platforms, including Windows and Linux.
The default for INFILE is stdin.
A number of CW and audio parameters can be changed from their default values, by
command line switches or a config file (see below). These are (default values in brackets):
.B -w wpm
- CW speed in words per minute [25]
.B -e wpm
- Effective CW speed. If set, the spaces are sent at this speed instead of the
character speed set by -w ("Farnsworth").
.B -W x
- Extra Word spacing. Similar to -e, but only affects the inter-word spacing,
not the inter-character spacing.
.B -f freq
- audio frequency in Hz [600]
.B -T SINE|0|SAWTOOTH|1|SQUARE|2
- set waveform to sine, sawtooth, squarewave. [sine]
.B -Q minutes
- Increase CW speed (QRQ) by 1 WpM in intervals of `minutes'. Speed will be
reset to the initial value at the start of each chapter. [0]
.B -n
- Disables resetting the speed when using the -Q option.
.B -p
- Disables the paragraph separator (<BT>)
.B -R risetime
- risetime, in samples [50]
.B -F falltime
- falltime, samples [50]
.B -O
- Use OGG/Vorbis encoder instead of MP3 if compiled with OGG support
.B -X
- Do not encode, do not generate output files
.B -s samplerate
- samplerate for the OGG/MP3 file [11025]
.B -b bitrate
- MP3 bitrate, kbps [16]
.B -q quality
- MP3 quality, 1 (best) to 9 (worst). CW still sounds very good with the worst quality, encoding time is greatly reduced. [5]
.B -c chapter separator
- Split chapters at this string [CHAPTER]. If empty or starts with a dash,
chapters will not be split and the output files will not be numbered.
.B -d duration
- Splits output files after "duration" seconds; finishes the current sentence.
.B -l wordlimit
- Splits output files after "wordlimit" words; finished the current sentence.
.B -o outfile-name
- Output filename (chapter number and .mp3/.ogg will be appended) [Chapter]
.B -a author
- Author for the ID3 tag. Use quotes for strings with spaces (e.g. "JW Goethe")
.B -t title
- Title for the ID3 tag. Use quotes for strings with spaces (e.g. "Faust II")
.B -k comment
- Comment for the ID3 tag. Use quotes for strings with spaces.
.B -y year
- Year for the ID3 tag.
.B -u
- Switches input encoding format to UTF-8. Currently supported alphabets
include Latin, Greek, Hebrew, Arabic and Cyrillic. Default is ISO 8859-1.
.B -E file
- Loads configuration from `file`.
.B -g file
- Guesses the encoding of `file` (ISO 8859-1 / ASCII or UTF-8).
.B -S [ISO|UTF]
- Shows a table of all available morse symbols for the ISO 8859-1 and UTF-8
character sets. Output in HTML format.
.B -N snr
- When this option is used, a noise background is added to the file and the CW
signal is scaled down to achieve a SNR (Signal to Noise ratio) of "snr" dB.
Possible range of SNR: -10db to 10dB. Make sure to enclose the value in
quotation marks if it's negative (i.e. -N "-3").
.B -B bandwidth in Hz
- Sets the filter bandwidth if the -N / SNR option is used. Available filters
are 100Hz, 500Hz, 1kHz and 2.1kHz.
.B -C frequency in Hz
- Sets the center frequency of the filter if the -N / SNR option is used. This
should be set to the frequency of the Morse signal; currently implemented
center frequencies: 800Hz
.SH TEXT COMMANDS
CW prosigns can be generated by enclosing arbitrary letters in angle brackets
(e.g. <AR>, <SK>, ...).
The tone frequency (f), speed (w), effective speed (e), volume (v, 1..100)
waveform (T) and SNR (N) can be changed arbitrarily within the text by
inserting commands, starting with a pipe symbol, followed by the parameter to
change and the value. Additionally, |Sn adds a period of n milliseconds silence
to the file at the given position (0 < n < 10000).
Example: |f400 changes the tone frequency to 400Hz, |w60 changes the speed to
60wpm, |T3 changes the waveform to squarewave.
.SH CONFIG FILE AND CHARACTER MAPPINGS
ebook2cw looks for a config file, ebook2cw.conf, in which all settings that
can be changed by command line parameters can be set. Any settings made in the
config file can be overridden by command line arguments.
Additionally, two `map` files can be set in the config file, for ISO8859-1 and
UTF-8. You can map characters in those files to a string, which may be useful
to replace characters like the exclamation mark (!) to a period (.), which is
more common in CW.
A set of example config and map file and a description thereof can be found at
DESTDIR/share/doc/ebook2cw/examples/.
.SH MISC
ebook2cw can also be compiled to run as a CGI to serve MP3 and OGG files
on the fly for web applications.
.SH AUTHOR
Fabian Kurz, DJ5CW <fabian@fkurz.net>
https://fkurz.net/ham/ebook2cw.html
.SH "SEE ALSO"
.BR morse (1)