Home  Download  Install  Demo  Programming VoiceXML Speech Interfaces Technical

Brainhat Installation and Use
Supported Platforms:

Linux

Windows

Client:

Windows SAPI V4 Interface Client


Contact Us
Kevin Dowd
Brainhat
111 Founders Plaza
13th Floor
East Hartford, CT 06108
(860) 291-0851

dowd@brainhat.com
Installation and Use

There are several packages available for download. The installation instructions for each are available in this document.

 

Unix Server (Linux (Intel))

 

The Unix server distribution can be used as a stand-alone command line Brainhat program, as a text-based TCP daemon, or as a VoiceXML daemon.

 

  1. Retrieve the Unix server distribution.

     

  2. Create an installation directory. Directory /usr/local/etc/brainhat is preferred. Brainhat will run from this directory in daemon mode, if possible, to reduce security risks.

     

  3. Copy the Brainhat Unix distribution to the directory created in the step above.

    Extract with the command:
    tar xvfz brainhat.tgz

     

  4. If you will be running Brainhat as a daemon, see that you have a user nobody defined in your passwd file. Brainhat will run as nobody in daemon mode, if possible, to reduce security risks.

Unpacking the distribution will create several directories:

 

./data
This directory contains that data files that Brainhat needs when it runs.

 

./scenarios
The files in here are pre-prepared samples of Brainhat scenarios.

 

./robottest
This directory contains sample code for building Brainhat interfaces to other programs (and robots).

A few of the important program modules include:

 

./comp
This is the Brainhat binary.

 

./simplecpp
Program that preprocesses the data files before ./comp is invoked.

 

./run
A script to preprocess Brainhat data files and invoke the program in interactive mode.

Running Brainhat (Unix):

 

As a command line, stand-alone program

 

The quickest way to start Brainhat is to type ./run in the directory where you unpacked the distribution. This will preprocess the data files in the ./data directory and supply them to Brainhat at startup.

The ./run command in equivalent to typing:

 

#!/bin/csh
cd data
echo -n "Pre-processing..."
../simplecpp < data9.in > data9
echo "Initializing"
cd ..
./comp data/data9

This makes Brainhat preprocess data/data9.in into data/data9, and feed the result to Brainhat. You may substitute other input as you like; the current working set is "data9."

 

As text daemon, listening on port 4144 (for use with SAPI client)

 

Become root. Preprocess data files if necessary (using simplecpp, as above).

Invoke with:

 

./comp data/data9 -d

 

As a VoiceXML daemon, listening on port 8080

 

Become root. Preprocess data files if necessary (using simplecpp, as above).

Invoke with:

 

./comp data/data9 -h

 

Reading Input Data Into Brainhat

 

There are two ways to pull English language data into Brainhat at runtime:

 

  • The file brainhat.init can contain English language text for Brainhat to use at run time. (Note: usually it is a good idea to debug your input text on-the-fly first, as detailed just below.)

     

  • Input can be called up on-the-fly as demonstrated here:

     

    >> input
    Input file name: scenarios/restaurant

     

    It can be very useful to see the input echoed back to you as Brainhat interprets it. To do this, enable ECHO mode under debug, like so:

     

    >> debug
    debug> debug echo
    debug> cont

 

Windows Stand-alone Program

 

For the time-being, the Windows distribution can be used as a stand-alone program only.

 

  1. Retrieve the Windows distribution.

     

  2. Create an installation directory. A reasonable choice might be c:\Program Files\Brainhat.

     

  3. Unzip the distribution into the installation directory created in the step above. Be sure to allow your unzip program to create subdirectories as needed.

Unpacking the distribution will create two directories:

 

.\data
This directory contains that data files that Brainhat needs when it runs.

 

.\scenarios
The files in here are pre-prepared samples of Brainhat scenarios.

A few of the important program modules include:

 

.\comp.exe
This is the Brainhat binary.

 

.\simplecpp.exe
Program that preprocesses the data files before ./comp is invoked.

 

.\run.bat
A script to preprocess Brainhat data files and invoke the program in interactive mode.

Running Brainhat:

 

As a stand-alone program

 

The quickest way to start Brainhat is to type .\run in the directory where you unpacked the distribution. This will preprocess the data files in the .\data directory and supply them to Brainhat at startup.

The .\run command in equivalent to typing:

 

cd data
echo 'Pre-processing...'
..\simplecpp < data9.in > data9
echo 'Running Brainhat'
cd ..
.\comp.exe data\data9

This makes Brainhat preprocess data\data9.in into data\data9, and feed the result to Brainhat. You may substitute other input as you like; the current working set is "data9."

 

Reading Input Data Into Brainhat

 

There are two ways to pull English language data into Brainhat at runtime:

 

  • The file brainhat.init can contain English language text for Brainhat to use at run time.

     

  • Input can be called up interactively at runtime as demonstrated here:

     

    >> input
    Input file name: scenarios/restaurant

     

    It can be very useful to see the input echoed back to you as Brainhat interprets it. To do this, enable ECHO mode under debug, like so:

     

    >> debug
    debug> debug echo
    debug> cont

 

 

Windows SAPI V4 Interface Client

 

Brainhat has a Microsoft SAPI Version 4 (Speech Applications Portability Interface) speech recognition/speech generation client. You will find it as bhatclnt.exe in the distribution directory. The client lets you talk to the computer, and the lets the computer talk back to you, using Brainhat as the intelligent agent. The client uses a dictation grammar. A version that works with uploadable limited domain or context free grammars is in the works.

 

  • You need a speech engine: If you have a SAPI compliant speech engine, you can download the client and give it a try. See http://www.microsoft.com/IIT/ for the latest SAPI SDK. Many speech engines, including Dragon Systems and ViaVoice can interface via SAPI.

     

  • You may also need the Winsock2 update from Microsoft if you are running Windows95.

SAPI client traffic takes place over port 4144. This is the port that compuserve uses. I chose to make use of it too because it is one of the ports that is opened through a number of corporate firewalls.

To run, simply double-click. The program will display a list of speech engines available, and then a list of users known to the selected engine. Next, choose a Brainhat server. Once you connect, the client then download grammar hints and the names of all scenarios contained in the .\scenarios subdirectory. You may prime the session by choosing a scenario from the list.

VoiceXML Client

 

There is no Brainhat VoiceXML client. Rather, Brainhat is a server that VoiceXML clients may use. You can invoke Brainhat as a VoiceXML daemon as described above. See VoiceXML, elsewhere on this site for more details.

 

 


 
©2001 Brainhat, Inc. All rights reserved.