Apollo Speech Synthesizer Emulator for the HP48
By Jarno Peschier

Among my other hobbies I am a member of the editorial staff of a small
(tiny, really) magazine on floppy disk (or Flagazine) here in the
Netherlands.

This magazine is called RUN Flagazine and consists of a sort of menu
program from which you can start several funny and/or interesting
programs. For more informatie about this contact
http://www.worldaccess.nl/~telerun (if you can read Dutch, that is).
This is an answer to the first explicit question you posed above. The
answer to your second question is that I have lots of experience with
the program (of course).

All of this Flagazine is written for MS-DOS computers (or compatibles)
and in PowerBasic (http://www.powerbasic.com), even though we are
thinking about changing over to VisualBasic/Windows for obvious
reasons.

The first Flagazines were character oriented with some programs
needing CGA or EGA (yes, this stuff is that old). Already quite some
time ago, we switched to a minimum requirement of EGA for the whole
thing, and the menuprogram got buttons, windows, etc.

At that point Paul Otter, one of our readers (who is blind), got a
little bit angry and very much disappointed, because he liked RUN
Flagazine and now could not do anything with it anymore.

He uses a little box called an Apollo speech synthesizer together with
a piece of TSR software to operate his computer. All the TSR software
does is pick ASCII characters from the character mode video memory (in
an intelligent way) and send them a designated serial port, together
with some very simple codes that the Apollo understands (like an ASCII
1 character to clear it's buffer immediately). All the Apollo does is
convert incoming ASCII text to speech, so the user can hear them
spoken.

This principe does not work with programs that work in graphical
modes, since the TSR program would have to do some sort of OCR
(optical character recognition) for this to work in general.

However... This was not a general case, of course, since all the
program on a RUN Flagazine were written by the editorial staff (or at
least edited, enhanced and beautified a bit, if it was a program sent
to us by a reader, which is possible), so we had compiled the source
code for every one.

It is of course quite easy for a programmer to open a serial port and
send ASCII text to it, so in my head the idea of "support for blind
people" was born (if you read Dutch, see
http://www.worldaccess.nl/~telerun/bo.htm). Basically I wrote a little
PowerBasic include file containing the needed routines.

Just make sure that you use "BlindPrint [String]" whenever you put
some text on the screen in the program (in whatever screen mode) and
use BlindFlush to flush the buffer when needed (e.g. when you clear
the screen) and basically your program is also suitable for blind
people that use an Apollo speech synthesizer. Voila!

(Of course there is just a tiny bit more to it than this for a program
that should also be easy to use for blind people, like special keys to
repeat certain blocks of text if they didn't hear them right the first
time, but that's besides the point here and this is getting long
enough as it is.)

By this time we had Paul jumping up and down (almost litterally ;-)).
But there was of course a problem: how do you test if your program
works right if al you get (if you're looking from the point of view of
someone who's blind) is a stream of ASCII text from a serial port? Now
*here* is where my "Apollo speech synthesizer emulator" (APOLLO.LIB
for short).

My HP48 also has a serial port, so I could use it to mimic an Apollo.
This way I could hook up my HP48, run the program, turn of the monitor
of my PC and pretend I was blind. Instead of hearing the text that
blind users will hear, I see it on the screen of my HP48. (This is a
strange experience the first couple of times. Really makes you look up
to blind users of PC's that operate their machines like this all the
time!)

I used some UserRPL source for a simple terminal program as the basis
(sorry, but I've forgotten who wrote that originally...) and first
stripped out the input part (so, if you press keys, it didn't send
anything back up the serial line). After that it only reacts to DEL
which ends the program. Then I added a feature that immediately
cleared the buffer when it contained a ASCII 1 character (and this
also cleared the screen).

Next I added a 8K restriction of the input buffer. The Apollo only has
a 8K buffer and simply looses anything that comes in when its buffer
is full. If you send a large body of text you need to be careful that
you either send it slow enough to let the Apollo handle it all, or to
stop just before you've sent 8K and prompt the (blind user) that the
rest will be spoken when (s)he presses a certain key. Otherwise, they
lose some of your text. Of course, my Apollo emulator had to function
the right way, or I could not actually test if I sent too much text at
once.

Then, UFL appeared (see http://www.engr.uvic.ca/~aschoorl/ufl/) and of
course I had to use the smallest UFL font instead of the smallest
builtin HP48 font in my Apollo emulator.

When I talked about this (that I had succesfully incorporated UFL in a
100% UserRPL program) someone in this newsgroup was curious and asked
if I could supply the program. Since I only had intended the program
for my personal use (other RUN Flagazine editors do not have a HP48
and of course all program with blind support are always tested on
Paul's system, who is now also part of our little group) I had no
documentation or anything else, but I made the program available to
him anyway. After that, I also put it up on my website for download.

Basically, that is the whole story of the Apollo speech synthesizer
emulator. All of you who expect to hear your HP48 talk to you are now
utterly disappointed, but you can only put the blame for that on
yourself (or the person you got the program from, saying that it was a
speech synthesizer program).

I do hop that this program is useful to some people. I know it's still
useful to me, and that's what counts in this particular instance.

Jarno Peschier (HP48 guru, or so they tell me ;-))
http://jarno.home.ml.org/




Jarno Peschier, computer science student, Utrecht University
 mailto:jpeschie@cs.ruu.nl http://jarno.home.ml.org/
____________________________________________________________
 'avwI' nejDI' narghta'bogh qama' reH 'avwI' Sambej