Monologue for Windows
Version 1.5 OEM
The Text-to-Speech DLL Interface

April 23, 1993

This document describes how to directly access the First Byte speech
engine from your program using the FB_SPCH.DLL.  After reading it, you
will know how to add basic speech capabilities to your programs using
the OpenSpeech, Say and CloseSpeech entry points.  the interface to
these entry points is described in terms of  a 'C' language syntax.  It
is assumed that the reader is familiar with loading and access a Windows
DLL from his/her programming environment.

If greater control over the speech functions is required (e.g. animated
mouth synchronization, word sync) or if your application must continue
running while speech is in progress, we recommend purchasing the
ProVoice for Windows Developers Toolkit.

The simplest text-to-speech functions can be performed with the
following three routines:

OpenSpeech		initiate a session with the Speech Engine

CloseSpeech		close a session with the Speech Engine

Say			speak a buffer-full of text.  Does not return until all the text is 	
			spoken.

Function prototypes for these routines are as follows:

void FAR PASCAL  CloseSpeech  (long SCB);

long FAR PASCAL OpenSpeech (HWND hwnd, WORD mode, LPSR voiceType);

int FAR PASCAL  Say (long SCB, LPSTR lpText);

The OpenSpeech routine must be called once and only once before any of
the other speech routines can be used.	It returns a SpeechControlBlock
(SCB) which is required when calling any subsequent speech routines.

Before terminating, your application must call CloseSpeech for the SCB
that was opened.  There is a snippet of code that calls all three of
these functions:

LONG lSCB;
lSCB = OpenSpeech (0, 0, NULL);
Say (lSCB, "Hello world.");
Say (lSCB, "Hello Again.");
CloseSpeech (lSCB);


If you are using the Microsoft of Borland linkers, and wish to
explicitly import these DLL functions, you will need to add the
following lines to your .DEF file:

	IMPORTS
		FB_SPCH.CLOSESPEECH
		FB_SPCH.OPENSPEECH
		FB_SPCH.SAY

If you are using Microsoft Visual Basic, you should use the following
Declarations:

Declare Function OpenSpeech Lib "\monologw\fb_spch.dll" (ByVal Hwnd%,
ByVal mode%, ByVal voiceType&) As Long

Declare Function CloseSpeech Lib "\monologw\fb_spch.dll" (ByVal lpSCB&)
As Integer

Declare Function Say Lib "\monologw\fb_spch.dll" (ByVal lpSCB&, ByVal
phrase$) As Integer

Global lpSCB As Long

