CLC-4-TTS and Fire Vox

CLC-4-TTS is a cross OS compatible (Windows, Mac, Linux) collection of JavaScript functions that can be used for transforming Firefox into a self-voicing browser. This software is open source and is licensed under the terms of the GNU GPL.

There are currently two libraries available: CLC-4-TTS and CLC-Utils. CLC-4-TTS (Core Library Components for Text-To-Speech) provides a library of JavaScript functions that allow programmers to pass in a string and have it converted to speech output. CLC-4-TTS uses the Microsoft SAPI 5 TTS engine (Windows platforms only) and the Java based FreeTTS engine (all Java capable platforms with Java 1.5.0), but it is designed to allow for other engine choices to be added later. CLC-Utils provides some handy functions that may be useful for implementing web page reading (such as text highlighting/unhighlighting). After installing these extensions, their functions can be used by other extensions in Firefox. These extensions are only libraries and do not add any menu items or hot keys to Firefox. To use them, they must be called by some other extension.

Fire Vox is a Firefox extension that uses the CLC-4-TTS and CLC-Utils library to make Firefox a self-voicing browser as well as provide extra accessiblity features. Both CLC-4-TTS and CLC-Utils must be installed before Fire Vox will work.

These libraries are now automatically installed along with Fire Vox. Starting with Firefox 1.5, the Firefox extension system has given extension developers the ability to create bundled extension packages which automatically install multiple extensions in one shot. In order to provide a much simpler installation process for users, I will be releasing in bundle pack format from now on. While I created these JavaScript libraries for Firefox extensions with the intention of using them as building blocks for web page reader (Fire Vox), they can be useful for other applications as well. In order to ensure that they can still be easily used as building blocks, the libraries and the screen reader will be kept as separate extensions internally. Developers who only want a specific libraries can easily extract just the library that they are interested in by opening the bundled extension package as a zip file. However, end users will only have to install one extension as opposed to three.

Currently, there are 3 speech engines available: Microsoft SAPI 5 (Windows XP has SAPI 5 right out of the box), Apple's TTS (Mac OS X has it built-in), FreeTTS (an open source Java-based TTS engine). For more information about SAPI, please go to the Microsoft SAPI page. For more information about Apple's TTS, please go to Apple's Text-to-Speech page.For more information about FreeTTS, please go to the FreeTTS page.

A technical discussion of the current limitations on implementing CSS can be found here. I believe that the "say-instead" property should be added to the CSS3 speech module and CLC-4-TTS supports this property; here is a demo page that shows "say-instead" in action.

You can select which speech engine you wish to use by going to Tools, Fire Vox TTS Selection.

Demos

A demo page showing the Math ML elements is here, a demo page showing the form controls can be found here,a demo page featuring the JavaScript support is here, and another demo page featuring the CSS speech properties support is over here.

Documentation

Documentation for CLC-4-TTS
Documentation for CLC-Utils
Documentation for Fire Vox

Source code for the SAPI DLL

Note: This is not needed to use the libraries. A compiled DLL already comes in the CLC-4-TTS library. This source code is simply made available for anyone interested in seeing what is going on behind the scenes. You need the SAPI 5.1 SDK from Microsoft as well as the Gecko SDK from Mozilla to compile this. The source code for the DLL is written in C++ and it is provided as a Visual C++ project; you can use another compiler if you wish, but you will have to setup your own project files. Aside from the DLL, all the rest of the source code is in JavaScript and is already available inside the XPI files. All you need to do is open the XPI as a ZIP file, extract the JAR file, and extract everything inside the JAR file. All of that code is in plain text format and can be viewed using a regular text editor (such as Notepad).

SAPI DLL Source Code

Source code for Mac TTS

Note: This is not needed to use the libraries. A compiled version already comes in the CLC-4-TTS library. This source code is simply made available for anyone interested in seeing what is going on behind the scenes. Because of problems with XPCOM and Cocoa, the Mac TTS interface is actually done as a local TTS server. The local TTS server takes HTTP requests coming from the local host and generates speech.

Mac TTS Source Code

Source code for FreeTTS

Note: The CLC4TTS_Java.java code assumes that FreeTTS has already been installed; to make things easier on end users, I packed the compiled class file for CLC4TTS_Java and the FreeTTS binaries into an install package using IzPack. The FreeTTS binary and source are available on the FreeTTS homepage. The install.xml file included in this zip file was used to generate the install package using IzPack.

Java FreeTTS Interface Source Code

Contact

E-mail: clc@clcworld.net
Be sure to have "CLC" somewhere in the subject line; otherwise there is a very good chance that your e-mail may be filtered out as spam. In addition, please try to make the rest of the subject line as meaningful as possible.