CLC-4-TTS: Core Library Components for Text-To-Speech

by Charles L. Chen
January 10, 2008
ver. 3.3


Table of Contents

  1. Introduction
  2. Conventions Used In This Documentation
  3. List of Functions Provided
  4. Usage Instructions
  5. Changes

1. Introduction

This library is a collection of useful functions for creating text-to-speech applications, such as a screen reader, within Mozilla Firefox. Installing the CLC-4-TTS extension will give all other extensions within Firefox the ability to use the JavaScript functions provided in this library. The CLC-4-TTS extension by itself is only a library and does not add any hotkeys or menus to Firefox. All functions and global variables used in this library are preceded with "CLC_" to avoid any potential naming conflicts. Currently, Microsoft SAPI 5, FreeTTS, Orca, and Apple's TTS are available.

To install the FreeTTS engine, you will need to install the Java Runtime Environment and then install the CLC-4-TTS: FreeTTS for Firefox files.

The Java Runtime Environment can be downloaded from Sun Microsystems by following this link.

After you have installed the Java Runtime Environment, please download CLC-4-TTS FreeTTS for Firefox installer by following this link. If your Java Runtime Environment has been properly installed, you should be able to directly run this Java-based installer.

The code for this library is open source and is licensed under the terms of the GNU GPL.


2. Conventions Used In This Documentation

While JavaScript is not typed the way C++ and Java are, I believe it is still helpful to identify the expected type of the inputs and outputs of the various functions. In order to do so, I have adopted the documentation convention of "RETURNTYPE functionname(TYPE_ARG1, TYPE_ARG2, ...)" for all of the functions presented here.

Example:
A function (non_existant_dummy_add_function) that is expected to add two integers passed in as arguments to it (X and Y) and return the result would be presented in the documentation as:
"int non_existant_dummy_add_function(int_x, int_y)"
An example of using such a function in your JavaScript would be:

var myfirstnumber = 1;
var mysecondnumber = 2;
var myanswer = non_existant_dummy_add_function(myfirstnumber, mysecondnumber);
alert(myanswer);

The expected result of the above example would be the number 3 showing up in an alert box.
The following is a list of types that I have used and what they mean:


3. List of Functions Provided


4. Usage Instructions

CLC_Init

bool CLC_Init(int_engine)

Input parameters:

Return parameter: Error messages: Additional notes:


CLC_Shutdown

void CLC_Shutdown()

Input parameters:

Return parameter: Error messages: Additional notes:


CLC_Make_TTS_History_Buffer

void CLC_Make_TTS_History_Buffer(int_maxsize)

Input parameters:

Return parameter: Error messages: Additional notes:


CLC_Ready

bool CLC_Ready()

Input parameters:

Return parameter: Error messages: Additional notes:


CLC_Interrupt

void CLC_Interrupt()

Input parameters:

Return parameter: Error messages: Additional notes:


CLC_Say

void CLC_Say(string_message, int_pitch)

Input parameters:

Return parameter: Error messages: Additional notes:


CLC_Read

void CLC_Read(DOM-Obj_contentobj, string_contentText, int_pitch)

Input parameters:

Return parameter: Error messages: Additional notes:


CLC_Recently_Read

DOM-Obj CLC_Recently_Read(int_index)

Input parameters:

Return parameter: Error messages: Additional notes:

CLC_SAPI5_Direct_Speak

void CLC_SAPI5_Direct_Speak(string_sapi5xml, int_speakflags)

Input parameters:

Return parameter: Error messages: Additional notes:

CLC_Spell

void CLC_Spell(string_message, int_pitch)

Input parameters:

Return parameter: Error messages: Additional notes:

CLC_SAPI5_FixMessage

string CLC_SAPI5_FixMessage(string_message)

Input parameters:

Return parameter: Error messages: Additional notes:

CLC_Shout

void CLC_Shout(string_message, int_pitch)

Input parameters:

Return parameter: Error messages: Additional notes:


CLC_ShoutSpell

void CLC_ShoutSpell(string_message, int_pitch)

Input parameters:

Return parameter: Error messages: Additional notes:


CLC_FREETTS_InsertSpaces

string CLC_FREETTS_InsertSpaces(string_message)

Input parameters:

Return parameter: Error messages: Additional notes:


CLC_SayWithProperties

void CLC_SayWithProperties(string_message, array_speechProperties, array_additionalProperties)

Input parameters:

Return parameter: Error messages: Additional notes:


CLC_ReadWithProperties

void CLC_ReadWithProperties(DOM-Obj_contentobj, contentText, array_speechProperties, array_additionalProperties)

Input parameters:

Return parameter: Error messages: Additional notes:


CLC_ShoutWithProperties

void CLC_ShoutWithProperties(string_message, array_speechProperties, array_additionalProperties)

Input parameters:

Return parameter: Error messages: Additional notes:


CLC_SetLanguage

void CLC_SetLanguage(string_theLanguage)

Input parameters:

Return parameter: Error messages: Additional notes:



5. Changes