-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path11-02-speech.html
194 lines (149 loc) · 7.77 KB
/
11-02-speech.html
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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
<!doctype html>
<html lang="en">
<head>
<!--
This Amos Professional Manual is written by asymetrix for the Amiga community and should stay completely FREE FOREVER.
Created 2008. :)
It was created from the original AMOS Professional Manual by Europress Software Ltd.
It has been updated by Fredrik Rambris.
-->
<title>Speech - AMOS Professional Manual</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, user-scalable=yes, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta name="keywords" content="Amos Professional, Amiga, Programming, Basic, Francois Lionet, Europress Software Ltd, Amos, computing, code, AmigaDOS">
<meta name="author" content="asymetrix,Fredrik Rambris">
<link rel="GitHub" href="https://github.com/fredrik-rambris/amospromanual">
<meta property="og:site_name" content="AMOS Professional Manual">
<meta property="og:image" content="https://amospromanual.dev/images/cover.jpg">
<link rel="stylesheet" type="text/css" href="styles.css">
<link rel="canonical" href="https://amospromanual.dev/11-02-speech.html">
</head>
<body>
<section>
<h1>Speech</h1>
</section>
<section id="01-synthetic-speech">
<h2>Synthetic speech</h2>
<p>
AMOS Professional programmers are not restricted to printing words on screen. You can
corn ma nd your Amiga to say them! This can be invaluable for people whose eyesight is
impaired, for the creation of teaching programs for younger users, as well as for adding
atmosphere to computer games and sheer fun. Before uttering its first words of the day, a
Narrator device is loaded off disc automatically, and this takes a few seconds. After that, speech
is almost instant. Obviously, hard disc users must remember to install the Narrator on hard disc
before the Amiga will speak.</p>
<h3 class="command" id="i-say">SAY</h3>
<p><i>instruction: speak a phrase</i><br>
<b>Say</b> text$<br>
<b>Say</b> text$,mode</p>
<p>
This is one of the simplest of all AMOS Professional commands to use, and it has one of the most
satisfying results. Use the SAY instruction with a string of text, containing all the words and
punctuation you want AMOS Professional to speak, like this:</p>
<code class="prefix edit">Say "Welcome, everybody!"</code>
<p>
Normally, all other instructions, music or sound effects will wait until AMOS Professional has
finished speaking before they are executed. This default speech mode has a value of zero. By
adding an optional mode value of 1, synthetic speech can be delivered while the rest of the
program is being executed. This will necessarily slow down the relevant routines. To return to
the default mode, use a line like this:</p>
<code class="prefix edit">Say "Default mode.",0</code>
<p>
Now get AMOS Professional to say anything you like, using the next simple routine, but please
mind your language! Try experimenting with numbers and symbol characters too.</p>
<code class="prefix edit">Do
Input "Please tell me what to say:";S$
S$=S$+"."
Say S$
Loop
</code>
<p>
If the Narrator system appears to fumble over a particular phrase, you are free to clarify things
by adding spaces at the end of a sentence, or using phonetic spellings. As always, you cannot do
any harm by experimenting.</p>
<h3 class="command" id="i-set-talk">SET TALK</h3>
<p><i>instruction: set style of speech</i><br>
<b>Set Talk</b> sex,mode,pitch,rate</p>
<p>
The easiest way to test this command is to play with its parameters. These are given
in the form of four values, and any of them can be omitted, providing
the relevant commas are in position.</p>
<p>The parameters are as follows:</p>
<p>
<b>Sex</b> can be set to zero for a male or 1 for a female voice. If you are not satisfied with these
alternatives, zombies, leprechauns and much else besides can be created by playing with the
other parameters.</p>
<p>The <b>mode</b> parameter uses zero for normal speech or 1 for a bizarre rhythmic pattern.</p>
<p>
<b>Pitch</b> is the parameter that changes the audio frequency of the synthetic voice from a deep bass
(65) up to a high soprano (320).</p>
<p>
The final <b>rate</b> parameter tells AMOS Professional how many average-length words to recite per
minute. This can range from a slow drawl (40) to complete gibberish (400).</p>
<p>Here are some examples:</p>
<code class="prefix edit">Set Talk 1,1,, : Say "A rhythmic lady."
Set Talk 0,0,320,350 : Say "Bubbling fish face."
Set Talk ,,65,40 : Say "I'm a very lazy bullfrog."
Set Talk 0,,155,70 : Say "Hello, John Major speaking"
</code>
<h3 class="command" id="i-talk-misc">TALK MISC</h3>
<p><i>instruction: set volume and frequency for speech</i><br>
<b>Talk Misc</b> volume,frequency</p>
<p>Existing AMOS users will find that the AMOS Professional speech facilities have been
augmented and improved. The TALK MISC command allows you to set the volume and
frequency of the narrator voice used for SAY instructions.</p>
<p>
Synthetic speech can be delivered from a whisper to a shout, by setting the volume parameter
between zero for silence, up to 64 for full volume. Frequency is directly adjusted by setting a
value from 5000 to 25000, with some superb effects being generated at slower frequencies. Note
that the higher the frequency setting, the more processor time will be taken in multitask mode.</p>
<p>Try this example:</p>
<code class="prefix edit">For V=16 To 64 Step 8
For F=5000 To 25000 Step 5000
Talk Misc V,F
SAY "I think therefore I AMOS!"
Next F
Next V
</code>
<h3 class="command" id="i-talk-stop">TALK STOP</h3>
<p><i>instruction: stop speech in multitask mode</i><br>
<b>Talk Stop</b></p>
<p>
This simple command is used to terminate synthetic speech delivered by a SAY instruction,
while in multitask mode.</p>
</section>
<section id="02-the-narrator-mouth">
<h2>The narrator Mouth</h2>
<p>
Another feature of the narrator device exploited by AMOS Professional is the MOUTH system,
which can be displayed in multitask mode only. The MOUTH functions are used to govern the
shape and movement of an animated mouth on screen, as follows:</p>
<h3 class="command" id="fn-mouth-width">MOUTH WIDTH</h3>
<p><i>function: return the width of animated mouth</i><br>
width=<b>Mouth Width</b></p>
<p>
MOUTH WIDTH reports the width of the mouth at any instant, in pixels. This function will
return a negative value if the current speech has finished.</p>
<h3 class="command" id="fn-mouth-height">MOUTH HEIGHT</h3>
<p><i>function: return the height of animated mouth</i><br>
height=<b>Mouth Height</b></p>
<p>
Similarly to MOUTH WIDTH, a negative value is returned if the speech is over, otherwise the
current height of the mouth is given in pixels.</p>
<h3 class="command" id="fn-mouth-read">MOUTH READ</h3>
<p><i>function: read position of animated mouth</i><br>
position=<b>Mouth Read</b></p>
<p>
This function waits for a mouth movement, and then reads the new mouth values directly into
the MOUTH WIDTH and MOUTH HEIGHT functions, as demonstrated by the usual ready-
made example program.</p>
</section>
<footer>
<a href="11-01-fonts.html" rel="prev">Fonts</a>
<a href="./">Contents</a>
<a href="14-appendix-g-command-index.html">Index</a>
<a href="11-03-floating-point-numbers.html" rel="next">Floating Point Numbers</a>
</footer>
</body>
</html>