Preface Chapter 1 Chapter 2 Chapter 3 Chapter 4 Chapter 5

Chapter 3:
DECtalk Software Sample Programs

This chapter provides instructions on how to build the sample programs. Topics include:


Sample Programs

Some applications are included with DECtalk Software. These sample applications have been included to demonstrate the use of DECtalk Software APIs. These sources can be used as templates for other applications that you might want to develop. Sources to these programs can be found in:

/usr/examples/dtk/dtsamples

The samples and a brief description are listed below.


Building the Sample Programs

Sample programs can be created from the sources provided in /usr/examples/dtk/dtsamples. This section describes the procedure for building the sample programs. Before proceeding make sure that the DECtalk Software development kit has been installed. See the DECtalk Software Users Guide for more information on different components of DECtalk Software.

  1. Create a local directory that you want to build he sample programs in.

  2. Copy all the files in /usr/examples/dtk/dtsamples into the directory that you just created.

  3. Generate a Makefile from the Imakefile by typing:

    /usr/bin/X11/xmkmf

  4. Compile and link the sample application programs by typing the following while still in the directory that you just created:

    make all

  5. After the make program completes successfully, the sample programs are ready to run.

In addition to the sample programs you will also find some demo text files in your directory. These files demonstrate some of the DECtalk Software capabilities.


Programming

This section describes the DECtalk API programming environment. Topics include:

  1. Header files

  2. Shareable libraries

  3. Compiling and linking applications

Header Files

DECtalk provides three header files that contain all the public data-structure definitions that the DECtalk Software API references. They are ttsapi.h, dtmmedefs.h, and engphon.h. When DECtalk Software is installed, these files are in /usr/include/dtk.


Shareable Libraries

DECtalk Software APIs are available to programmers in two shareable libraries.

As in the case of the header files, if you want to use DECtalk Software to write an application that produces buffers of synthesized speech, then the program is linked with libtts.so. If, on the other hand, you want to use the Multimedia Services for DIGITAL UNIX to communicate with the audio subsystem then the application has to be linked with libttsmme.so.