home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
GEMini Atari
/
GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso
/
files
/
program
/
c_say
/
readme.say
< prev
next >
Wrap
Text File
|
1993-10-23
|
3KB
|
98 lines
A talking C function
~~~~~~~~~~~~~~~~~~~~
From SPEAK2.TOS by A.D.BEVERIDGE & M.N.DAY
C interface by S.ROUX december 90.
PRESENTATION
~~~~~~~~~~~~
The purpose of this function is to provide an easy access
to the speech synthesizer from a C program.
The function uses timer A interrupt, so the program is not blocked
and can continue processing while the computer speaks. (like the Xbios 32
Dosound function.)
This code was extracted in the file SPEAK2.TOS.
FUNCTIONS DESCRIPTION
~~~~~~~~~~~~~~~~~~~~~
int say(mode, buffer)
int mode; char *buffer;
mode = 0 -> immediate return, silence at end of sentence.
mode = 1 -> wait the end of voice before returning.
mode = 2 -> immediate return, no silence at end of sentence.
mode = 3 -> tests if voice is active.
buffer = list of phonemes , terminated by '\0' -> normal speaking.
buffer = NULL -> no speaking (useful with mode 1)
buffer = "" -> repeat previous sentence.
The function always waits the end of the previous sentence
before speaking.
If the buffer contains invalid phonemes, no voice is output
and the function immediatly returns non zero. Depending on the mode,
the function waits or not the end of sentence before returning 0.
In mode 3, the function returns 1 if the voice is active,
0 otherwise (in this mode, the `buffer' parameter is not used).
int set_pitch(int val);
Set the tonality of the voice. value can lay from 48 to 199.
48 : shrill 80: normal 199: bass
int set_rate(int val);
set the speed of the voice. values : 20 .. 199
20: fast 80: normal 199: slow
char say_copyright[]
Address of a character string hidden in the object file.
use: printf("%s", say_copyright);
or Cconws(say_copyright);
SENTENCE SYNTAX
~~~~~~~~~~~~~~~
The buffer passed in parameter to say() is ascii text,
using the folowing phonemes:
EY AY OY OW WX YX AE IY ER AO UX UH AH AA OH
AX IX IH EH DH ZH CH CH LX RX SH NX TH /H V
Z J L R W Y Q P T K B D G M N
F S - ? . UL UM UN IL IM IN
Each phoneme can be followed by a number from 1 to 9, modifying the
tone of the voice. ex: AY2, UX4
The modifiers `>' or `<' make the phoneme longer or shorter.
These 2 types of modifiers (1..9, < and >) can be used together.
The pseudo phonemes `?' and '.' give respectively interrogative
and exclamative inflexions to the preceding phoneme.
The pseudo phonemes ` ', `-' and `Q' are silences of different lengths.
ADVICES
~~~~~~~
1)
Never get out of a program while the voice is on, because
the internal speech buffer would be corrupted, causing a crash.
Use say(1,0L) to wait the end of the voice.
2)
You can create sentences with SPEAK2.TOS and a shell (like Gulam):
$ speak2.tos > myfile.say
$ ue myfile.say
3)
If you can understand the coding of the phonemes, try to add
the missing french phonemes: 'AN' 'ON', 'IN', 'R' 'U' etc
THANKS
~~~~~~
To the authors of speak2.tos