Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / February 2006

Tip: Looking for answers? Try searching our database.

Java Speech API

Thread view: 
ro001 - 09 Feb 2006 02:11 GMT
Hi i found the code below on Java.Sun and i have read about different
speech engines like Freetts that develop the Java Speech API.

But i still can not get to comple the following code as the 3 packages
declared can not be found?

Could anyone be so kind as to tell me what i need to install in oder to
use these packages??!!

cheers and thanks for any replys!

import javax.speech.*;
import javax.speech.synthesis.*;
import java.util.Locale;

public class HelloWorld {
    public static void main(String args[]) {
        try {
            // Create a synthesizer for English
            Synthesizer synth = Central.createSynthesizer(
                new SynthesizerModeDesc(Locale.ENGLISH));

            // Get it ready to speak
            synth.allocate();
            synth.resume();

            // Speak the "Hello world" string
            synth.speakPlainText("Hello, world!", null);

            // Wait till speaking is done
            synth.waitEngineState(Synthesizer.QUEUE_EMPTY);

            // Clean up
            synth.deallocate();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
Roedy Green - 09 Feb 2006 03:20 GMT
>SynthesizerModeDesc
that is a part of the JSAPI.  See
http://mindprod.com/jgloss/jsapi.html
also
http://mindprod.com/jgloss/wherejars.html
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.