Modularity is vital to a user interface system. Chimera was initially designed as primarily a window manager, but recent changes have enabled it to incorporate separate programs. Now, Chimera is able to manipulate independent programs through creative use of sockets and enables user communication between this speech recognition system and the potential applications that wish to use it.

The key component to this is inter-process communication (IPC). Because Chimera uses different components that are written in different languages, it uses sockets to relay commands from the actuators to the programs. The basic idea is that each application that wishes to make use of Chimera will be assigned to a separate port. Thus, commands for a certain program will always be sent to one port, where it is handled and initiates an action in the application.

Theoretically any programming language that can handle ports can be the basis of the server, as long as it can listen on their port for commands and run the application at the same time. However, by default the system supports applications written in Java, since Java supports threading so well. Each Java application that wishes to incorporate Chimera must have both an accompanying front-end program and a listening server program. The server invokes the front-end as a separate thread from itself, and creates a socket object that listens for commands on a prespecified port.


When the actuator for DumPad is called, it sends the command in string form to a specific port number. If the server for the program is listening, it invokes a method of the front-end program, which subsequently calls the functions of the application itself. This allows any program that can send messages to a socket to invoke the application's functions. In our example, the dumpad actuator currently recognizes and saves 6 commands: save, open, exit, cut, copy, and paste.

Exact changes made to incorporate DumPad into Chimera:
1. Program is written (DumPad.java).
2. Front-end thread is written (Editor.java): a few simple methods and the DumPad object.
3. Server is written (PKServer.java): initiates the front-end upon construction.
4. The file dManager.cpp is modified: added an extra else-if statement matching the command 'dumpad', wrote includes for dumpad_actuator.cpp.
5. The actuator for DumPad is written (dumpad_actuator.h & dumpad_actuator.cpp): written as a child class of Abstract_Actuator, where the most important code is in the function void activate().
6. DumPad grammar is added to the Phoenix grammar files (DumPad.gra).
7. DumPad commands are added to the Sphinx dictionary via corpus (test.corpus).

To implement another Java application into Chimera, the program itself must be wrapped in a front-end that implements Runnable and kept as a member of the server program. However, to integrate that application fully into Chimera's system, the Sphinx dictionary, and Phoenix grammars must both be updated with new vocabulary, and the dialogue manager must be updated to be able to recognize a new command. A simple individual actuator file that will be invoked by the dialogue manager actually sends the message to the particular socket.

In the future, Chimera will streamline this process of adding support for applications. First of all, the process of modifying Phoenix, Sphinx, and dManager files will be automated. Second of all, There will be a 'master server' (MS) which will be running at a specific, known port. If an application wishes to "plug-in" to Chimera, it will communicate this request to the MS. The MS will then respond with a negative (if max capacity of programs is reached, etc.) or a port number. The application will then assign itself this number and begin listening to that port. Meanwhile, the MS will keep a list of all ports that are being taken, identifying each port by program name. When the dialogue manager needs to know the port number assigned to a certain application, it will simply request a search through the MS, and then send it to the returned port number. This will remove the annoyances of remembering specific predetermined ports for various programs.

Back to Extentions

Back to the Main Page