You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+30-27Lines changed: 30 additions & 27 deletions
Original file line number
Diff line number
Diff line change
@@ -14,17 +14,21 @@ Type "7z x filename" to extract the archive.
14
14
15
15
16
16
17
+
17
18
# Morse Audio to Text Translator Using Ada: MATTA
18
19
19
20
20
-
**ver 1.0.1 -- 29feb2020**
21
-
* Added txt2wav
22
-
* Improved coding
23
-
* Initial version.
21
+
**ver 1.0.2 -- 03aug2021**
24
22
23
+
* The commandline parameter estimated WPM may now be [optionally] omitted if the morse code message is long enough to get meaningful timing statistics.
25
24
26
-
## Note: Please ignore the "Source code" zip & tar.gz files. (They are auto-generated by GitHub). Click on the large 7z file under releases to download all source & binaries (Windows,Mac & Linux). Then, type "7z x filename" to extract the archive.
27
25
26
+
**ver 1.0.0 -- 29feb2020**
27
+
28
+
* Initial version.
29
+
30
+
31
+
### GitHub Note: Please ignore the "Source code" zip & tar.gz files. (They are auto-generated by GitHub). Click on the large 7z file under releases to download all source & binaries (Windows,Mac & Linux). Then, type "7z x filename" to extract the archive.
28
32
29
33
30
34
## Description
@@ -35,8 +39,6 @@ The input wav file must be monaural, with a 16-bit signed integer encoding, and
35
39
36
40
Now includes an inverse commandline app, txt2wav that creates a morse code WAV file from English text.
37
41
38
-
The proper command to extract the archive and maintain the directory structure is "7z x filename".
The new inverse app takes a commandline string, which must be quoted to include spaces thusly:
65
72
66
73
txt2wav "the quick brown fox"
67
74
68
-
and creates an output WAV file, named "new20wpm.wav", with the morse code equivalent. This output file can be renamed and manipulated using sox.
75
+
and creates an output WAV file, named "new20wpm.wav", with the morse code equivalent. This output file can be renamed and manipulated using "sox", as follows.
69
76
70
77
To slow it down try:
71
-
72
78
sox new20wpm.wav new10wpm.wav speed 0.5
73
79
74
-
This also lowers the tone (from 500 to 250 Hz) so to restore the tone try:
75
-
80
+
This lowers the tone (from 500 to 250 Hz) so to restore the tone try:
76
81
sox new10wpm.wav hi10wpm.wav pitch +250
77
82
78
83
Too loud? Try
79
-
80
84
sox -v 0.8 hi10wpm.wav quiet10wpm.wav
81
-
82
-
Note that txt2wav is a cheap & dirty tool to create minimal test input files for wav2txt. The WAV headers might be illegal since they are blatantly copied from an existing WAV file. Nevertheless, "sox" and "soxi" seem to accept them. And if you are going to manipulate them with sox, the output of sox is probably legal.
A clean morse code sound file contains tonal beeps separated by periods of silence. After normalization, the sound wave peak amplitude is one, while the periods of silence have near zero peaks. The simple approach used here seeks to detect those changes in peak amplitude that signal dots, dashes, and spaces.
88
90
89
91
The (ideal) international morse code relative timings are defined as:
90
-
91
92
.) length of a dot = 1
92
-
93
93
.) length of a dash = 3
94
-
95
94
.) space after dot or dash = 1
96
-
97
95
.) space after a letter = 3
98
-
99
96
.) space after a word = 7
100
97
101
98
wav2txt is not perfect, but computer-generated sound files can be reliably decoded.
@@ -104,12 +101,17 @@ See also the inline code comments.
104
101
105
102
Final note: many good apps can easily be found to generate morse code sound files from text. One simple one is included (txt2wav) merely for the sake of completeness.
106
103
104
+
## Unresolved Question:
105
+
106
+
Can the requirement of an estimated WPM be dropped, somehow?
107
+
108
+
107
109
--------------------------
108
-
## Legal Mumbo Jumbo:
110
+
## License:
109
111
110
112
Covered by the GNU GPL v3 as indicated in the sources:
0 commit comments