Skip to content

Commit ec477f8

Browse files
committed
doxygen
1 parent 5a1676f commit ec477f8

File tree

3 files changed

+29
-11
lines changed

3 files changed

+29
-11
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,15 @@ Voices can be defined by setting the speed, pitch, throat and moth parameters:
4242

4343
You can try out some alternative parameter combinations [here](https://discordier.github.io/sam/).
4444

45+
## Output Format
46+
47+
The autput format is as follows:
48+
49+
- bits per sample: 16
50+
- sample rate: 22050
51+
- channels: 1
52+
53+
You can change the channels to 2 by calling ```sam.setOutputChannels(2);```
4554

4655
## Memory Requirements
4756

doc/html/index.html

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,15 @@ <h1><a class="anchor" id="autotoc_md3"></a>
9797
<div class="line">SAM 72 64 128 128</div>
9898
</div><!-- fragment --><p>You can try out some alternative parameter combinations <a href="https://discordier.github.io/sam/">here</a>.</p>
9999
<h1><a class="anchor" id="autotoc_md4"></a>
100+
Output Format</h1>
101+
<p>The autput format is as follows:</p>
102+
<ul>
103+
<li>bits per sample: 16</li>
104+
<li>sample rate: 22050</li>
105+
<li>channels: 1</li>
106+
</ul>
107+
<p>You can change the channels to 2 by calling <code>sam.setOutputChannels(2);</code></p>
108+
<h1><a class="anchor" id="autotoc_md5"></a>
100109
Memory Requirements</h1>
101110
<table class="markdownTable">
102111
<tr class="markdownTableHead">
@@ -108,7 +117,7 @@ <h1><a class="anchor" id="autotoc_md4"></a>
108117
</table>
109118
<p>The requirements have been determined by compiling the project with an ESP32. The values are rounded up! <br />
110119
</p>
111-
<h1><a class="anchor" id="autotoc_md5"></a>
120+
<h1><a class="anchor" id="autotoc_md6"></a>
112121
License</h1>
113122
<p>The software is a reverse-engineered version of a commercial software published more than 30 years ago. The current copyright holder is SoftVoice, Inc. (www.text2speech.com)</p>
114123
<p>Any attempt to contact the company failed. The website was last updated in the year 2009. The status of the original software can therefore best described as Abandonware (<a href="http://en.wikipedia.org/wiki/Abandonware">http://en.wikipedia.org/wiki/Abandonware</a>)</p>

doc/html/md__s_a_m.html

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,15 @@
6666
</div><!--header-->
6767
<div class="contents">
6868
<div class="textblock"><p>Software Automatic Mouth - Tiny Speech Synthesizer</p>
69-
<h1><a class="anchor" id="autotoc_md6"></a>
69+
<h1><a class="anchor" id="autotoc_md7"></a>
7070
What is SAM?</h1>
7171
<p>Sam is a very small Text-To-Speech (TTS) program written in C, that runs on most popular platforms. It is an adaption to C of the speech software <a class="el" href="class_s_a_m.html" title="Arduino API for SAM Text to Speach Engine.">SAM</a> (Software Automatic Mouth) for the Commodore C64 published in the year 1982 by Don't Ask Software (now SoftVoice, Inc.). It includes a Text-To-Phoneme converter called reciter and a Phoneme-To-Speech routine for the final output. It is so small that it will work also on embedded computers. On my computer it takes less than 39KB (much smaller on embedded devices as the executable-overhead is not necessary) of disk space and is a fully stand alone program. For immediate output it uses the SDL-library, otherwise it can save .wav files.</p>
7272
<p>An online version and executables for Windows can be found on the web site: <a href="http://simulationcorner.net/index.php?page=sam">http://simulationcorner.net/index.php?page=sam</a></p>
73-
<h1><a class="anchor" id="autotoc_md7"></a>
73+
<h1><a class="anchor" id="autotoc_md8"></a>
7474
Compile</h1>
7575
<p>Simply type "make" in your command prompt. In order to compile without SDL remove the SDL statements from the CFLAGS and LFLAGS variables in the file "Makefile".</p>
7676
<p>It should compile on every UNIX-like operating system. For Windows you need Cygwin or MinGW( + libsdl).</p>
77-
<h1><a class="anchor" id="autotoc_md8"></a>
77+
<h1><a class="anchor" id="autotoc_md9"></a>
7878
Usage</h1>
7979
<p>type</p>
8080
<p>make for the first output.</p>
@@ -91,7 +91,7 @@ <h1><a class="anchor" id="autotoc_md8"></a>
9191
</pre><p>It can even sing look at the file "sing" for a small example.</p>
9292
<p>For the phoneme input table look in the Wiki.</p>
9393
<p>A description of additional features can be found in the original manual at <a href="http://www.retrobits.net/atari/sam.shtml">http://www.retrobits.net/atari/sam.shtml</a> or in the manual of the equivalent Apple II program <a href="http://www.apple-iigs.info/newdoc/sam.pdf">http://www.apple-iigs.info/newdoc/sam.pdf</a></p>
94-
<h1><a class="anchor" id="autotoc_md9"></a>
94+
<h1><a class="anchor" id="autotoc_md10"></a>
9595
Adaption To C</h1>
9696
<p>This program was converted semi-automatic into C by converting each assembler opcode. e. g. </p><pre class="fragment">lda 56 =&gt; A = mem[56];
9797
jmp 38018 =&gt; goto pos38018;
@@ -100,18 +100,18 @@ <h1><a class="anchor" id="autotoc_md9"></a>
100100
. .
101101
</pre><p> Then it was manually rewritten to remove most of the jumps and register variables in the code and rename the variables to proper names. Most of the description below is a result of this rewriting process.</p>
102102
<p>Unfortunately its still a not very good readable. But you should see where I started :)</p>
103-
<h1><a class="anchor" id="autotoc_md10"></a>
103+
<h1><a class="anchor" id="autotoc_md11"></a>
104104
Short description</h1>
105105
<p>First of all I will limit myself here to a very coarse description. There are very many exceptions defined in the source code that I will not explain. Also a lot of code is unknown for me e. g. Code47503. For a complete understanding of the code I need more time and especially more eyes have a look on the code.</p>
106-
<h2><a class="anchor" id="autotoc_md11"></a>
106+
<h2><a class="anchor" id="autotoc_md12"></a>
107107
Reciter</h2>
108108
<p>It changes the english text to phonemes by a ruleset shown in the wiki.</p>
109109
<p>The rule " ANT(I)", "AY", means that if he find an "I" with previous letters " ANT", exchange the I by the phoneme "AY".</p>
110110
<p>There are some special signs in this rules like # &amp; @ ^</p><ul>
111111
<li>: % which can mean e. g. that there must be a vocal or a consonant or something else.</li>
112112
</ul>
113113
<p>With the -debug option you will get the corresponding rules and the resulting phonemes.</p>
114-
<h2><a class="anchor" id="autotoc_md12"></a>
114+
<h2><a class="anchor" id="autotoc_md13"></a>
115115
Output</h2>
116116
<p>Here is the full tree of subroutine calls:</p>
117117
<p>SAMMain() Parser1() Parser2() Insert() CopyStress() SetPhonemeLength() Code48619() Code41240() Insert() Code48431() Insert()</p>
@@ -122,7 +122,7 @@ <h2><a class="anchor" id="autotoc_md12"></a>
122122
<p>The wiki shows all possible phonemes and some flag fields. <br />
123123
The final content of these tables can be seen with the -debug command.</p>
124124
<p>In the function PrepareOutput() these tables are partly copied into the small tables: phonemeindexOutput[] stressOutput[] phonemelengthOutput[] for output.</p>
125-
<h2><a class="anchor" id="autotoc_md13"></a>
125+
<h2><a class="anchor" id="autotoc_md14"></a>
126126
Final Output</h2>
127127
<p>Except of some special phonemes the output is build by a linear combination: </p><pre class="fragment">A = A1 * sin ( f1 * t ) +
128128
A2 * sin ( f2 * t ) +
@@ -159,12 +159,12 @@ <h2><a class="anchor" id="autotoc_md13"></a>
159159
LSR A
160160
STA 54296 ;SID main output command
161161
</pre><p>The rest is handled in a special way. At the moment I cannot figure out in which way. But it seems that it uses some noise (e. g. for "s") using a table with random values.</p>
162-
<h1><a class="anchor" id="autotoc_md14"></a>
162+
<h1><a class="anchor" id="autotoc_md15"></a>
163163
License</h1>
164164
<p>The software is a reverse-engineered version of a commercial software published more than 30 years ago. The current copyright holder is SoftVoice, Inc. (www.text2speech.com)</p>
165165
<p>Any attempt to contact the company failed. The website was last updated in the year 2009. The status of the original software can therefore best described as Abandonware (<a href="http://en.wikipedia.org/wiki/Abandonware">http://en.wikipedia.org/wiki/Abandonware</a>)</p>
166166
<p>As long this is the case I cannot put my code under any specific open source software license Use it at your own risk.</p>
167-
<h1><a class="anchor" id="autotoc_md15"></a>
167+
<h1><a class="anchor" id="autotoc_md16"></a>
168168
Contact</h1>
169169
<p>If you have questions don' t hesitate to ask me. If you discovered some new knowledge about the code please mail me.</p>
170170
<p>Sebastian Macke Email: <a href="#" onclick="location.href='mai'+'lto:'+'seb'+'as'+'tia'+'n@'+'mac'+'ke'+'.de'; return false;">sebas<span style="display: none;">.nosp@m.</span>tian<span style="display: none;">.nosp@m.</span>@mack<span style="display: none;">.nosp@m.</span>e.de</a> </p>

0 commit comments

Comments
 (0)