Java Speechlet Homepage

Java learning aid for the blind

Updated 18/2/02 v1.11- FreeTTS friendly version

Updated 4/3/02 v1.12 - Handles components

speechlet@mullier.screaming.net

download Speechlet

you are accepting the license by downloading

 

download example Speechlet

 

download a template for JCreator

extract to JCreator's "templates" directory

Java Speechlet is a way for blind people to learn how to program Java even though most courses and textbooks are heavily graphic-based. It was written for a blind student at Leeds Metropolitan University's School of Computing,  by Dr Duncan Mullier. It was written in a hurry because we didn't know we had a blind student until he arrived and so there is probably a lot of improvements that could be made. Please tell me about any improvements you think would be helpful.

Speechlet mimics a Java applet but in addition to the usual applet facilities it intercepts calls to the Java Graphics class and outputs a brief text description in the system box (DOS box or IDE window). Furthermore it allows the user to move the mouse around the Java Speechlet window and speaks a description of each drawn object on the screen (e.g. "obscured blue oval"). Note that it does not read the whole screen, just the Java window. Support for the mouse is given by a short description of where the mouse entered the window (and left it) (e.g. "top left") as well as a facility for the user to ask where the mouse is (e.g. "x first quarter, y central").

Please send you comments about Speechlet so that it ca be improved. Although I can't promise anything, this is in my free time!

FAQ

Is it free?

What do I need?

How do I install it?

How do I use it?

How do I write a Speechlet?

Why is Speechlet based on an Application and not an Applet?

Can I have the source code please?

Your web page is rubbish.

 

 

Is it free?

Yes, although I will hold the copyright and do not give permission for it to be used in commercial products. I may use it as the basis for a small research project and so if anyone wants to improve it I would ask that they make their improvements available to me.

What do I need?

You will need the Java 2 SDK. You need the Speechlet library, which must be put in the classpath of your Java IDE. You will also need a Java Speech API (JSAPI) compatible text-to-speech engine. 

Speechlet has been tested on Win 98 and NT with 

FreeTTS (if you have an older machine it may be too slow and the sound quality may be unacceptable). The new version seems to work fine on my oldish PII 333. I recommend FreeTTS because it is free.

CloudGarden (which is a 30 trial and $16 thereafter).

  A list of compatible engines can be found here, I would like to hear report of which ones are ok and install simpley and perhaps are even free.

How do I install it?

I'm sorry that it is a little involved to install, but this is not a commercial package. Installation takes 2 steps

1 install a JSAPI compatible TTS engine. 

This usually involves adding some JAR files to Java's classpath. If you are using an IDE such as JCreator then you can add JAR files to your classpath by selecting configure->options->jdk profiles->JDK version x.x->edit->add package

You can use the TTS engine's example programs to see if all is in order.

2 install speechlet

Speechlet.zip should be extracted to your jdkx.x\jre\lib directory (a uk directory will appear there). jdkx.x needs to be added to you classpath, for JCreator this is done by selecting configure->options->jdk profiles->JDK version x.x->edit->add package and then selecting jdkx.x\jre\lib. If you are not using an IDE the you should specify the classpath to the javac compiler using the option "-classpath jdkx.x\jre\lib". If you are a total novice to Java then this may sound confusing, ask your tutor to do it for you.

How do I use it?

Speechlet is for writing program, so you ust write a Java program, which I will cover below. When your program in running it will dump an ordered list of calls to the system stream (DOs box or IDE output window, note JCreator can have either). Moving the mouse into the Speechlet window will reslut in the computer saying "entered top left" of whatever. Pressing F1 will give a description of where the mouse is. The window is split into a 4x4 grid with a central one superimposed over the middle. You will hear something like "mouse at x first quarter y central". Pressing F2 will give a description of the scene and F3 will stop any rambling speech. The descriptions are not great but they do work out whether one graphic has obscured another or whether it has been obliterated by another graphic (in which case it is ignored).

How do I write a Speechlet?

The code below is an example speechlet. You need to include the Speechlet library and then use tinit() instead of init() and tpaint() instead of paint(Graphics g). Speechlet is also based on an application and not an applet, therefore it needs the main at the end. This means that Speechlets run in their own window and not under a browser, although it is very easy to convert a Speechlet into an applet.


import java.awt.*;
import java.awt.event.*;
import uk.ac.lmu.speechlet.*; ///remove to convert to applet or application

class Practice extends Speechlet {

public void tinit()
{

}

public void tpaint()
{
    g.setColor(Color.red);
    g.drawString("Hello Speechlet",180,175);
}

public static void main(String args[]) {
    System.out.println("Starting Practice...");
    Practice mainFrame = new Practice();
    mainFrame.setSize(400, 400);
    mainFrame.setTitle("P");
    mainFrame.setVisible(true);
    }

}

Why is Speechlet based on an Application and not an Applet?

Because CloudGarden's engine does not work with applets even though it says it does. If I find a more stable engine then I will provide an applet version that runs under a browser.

 

Can I have the source code please?

If you want to contribute to this project then I will send you the source code. It isn't very complicated at all and didn't take very long to knock up and could be improved in many ways. However, I do not give permission to use the code or ideas in a different product for commercial use. Any additions should be reported back to me so that they can be included in the next version and posted here. If you cant the code then contact me at the address at the top of the page.

Your web page is rubbish.

I know, you can do a better job if you want.

 

License

Speechlet and its source code is Copyright (C) Dr D J Mullier 2002. It may be used by individuals or educational establishments free of charge. It may not be used in a commercial product. The source code is available on request but any additions and improvements  must be sent back for validation and possible inclusion if future versions. Downloading the Speechlet software is agreeing to this license. 

 Dr D J Mullier 5th Feb 2002