Regarding Java Speech APIs

Hey,
Can i know where do i find java speech API kit for download...can any one help me...it's urgent?

Google [java speech api kit]

Similar Messages

  • Java Speech API

    Hi
    When i compile the following program it give me error some of the Java speech API.
    import javax.speech.AudioException;
    import javax.speech.Central;
    import javax.speech.EngineException;
    import javax.speech.synthesis.Synthesizer;
    import javax.speech.synthesis.SynthesizerModeDesc;
    Can any one help.
    Thanks
    import java.awt.BorderLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import java.io.File;
    import java.io.FileReader;
    import java.io.IOException;
    import java.util.Collections;
    import java.util.Comparator;
    import java.util.Locale;
    import java.util.Hashtable;
    import java.util.prefs.Preferences;
    import javax.speech.AudioException;
    import javax.speech.Central;
    import javax.speech.EngineException;
    import javax.speech.synthesis.Synthesizer;
    import javax.speech.synthesis.SynthesizerModeDesc;
    import javax.swing.DefaultComboBoxModel;
    import javax.swing.JButton;
    import javax.swing.JComboBox;
    import javax.swing.JFileChooser;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JScrollPane;
    import javax.swing.JTextField;
    import javax.swing.JTextArea;
    import javax.swing.JToolBar;
    public class JavaVoice extends JFrame implements Comparator {
         private Synthesizer synth;
         private File readFile = null;
         Preferences preferences = Preferences.userRoot().node("dlb/JavaVoice");
         JComboBox voices;
         Hashtable list;
         public JavaVoice() {
              super("Java Voice Synthesizer");
              addWindowListener(new AppCloser());
              DefaultComboBoxModel model = new DefaultComboBoxModel();
              try {
                   javax.speech.EngineList elist = Central.availableSynthesizers(null);
                   list = new Hashtable(elist.size());
                   Collections.sort(elist,this);
                   for (int i=0;i<elist.size();i++) {
                        SynthesizerModeDesc desc = (SynthesizerModeDesc)elist.elementAt(i);
                        model.addElement(desc.getModeName());
                        list.put(desc.getModeName(),desc);
                   synth = Central.createSynthesizer((SynthesizerModeDesc) list.get(preferences.get("voice.selected","")));
                   synth.allocate();
                   synth.resume();
              catch(EngineException ex) {
                   ex.printStackTrace();
              catch(AudioException ex) {
                   ex.printStackTrace();
              final JTextArea textArea = new JTextArea();
              textArea.setLineWrap(true);
              textArea.setWrapStyleWord(true);
              JScrollPane scrollPane = new JScrollPane(textArea);
              getContentPane().add(scrollPane,BorderLayout.CENTER);
              JToolBar toolBar = new JToolBar();
              JButton button = new JButton("Open");
              button.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent ev) {
                        JFileChooser fileChooser = new JFileChooser(preferences.get("voice.openDirectory",System.getProperty("user.dir")));
                        if(fileChooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {
                             readFile = fileChooser.getSelectedFile();
                             preferences.put("voice.openDirectory",readFile.getParent());
                             try {
                                  FileReader reader = new FileReader(readFile);
                                  textArea.read(reader,readFile.getName());
                                  reader.close();
                             catch(IOException ex) {
                                  ex.printStackTrace();
              toolBar.add(button);
              button = new JButton("Clear");
              button.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent ev) {
                        textArea.setText("");
              toolBar.add(button);
              toolBar.add(button);
              button = new JButton("Start");
              button.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent ev) {
                        String str = textArea.getSelectedText();
                        if(str != null && str.length() > 0) {
                             synth.speakPlainText(str.toLowerCase(),null);
                             textArea.setSelectionStart(0);
                             textArea.setSelectionEnd(0);
                        else {
                             str = textArea.getText();
                             synth.speakPlainText(str.toLowerCase(),null);
              toolBar.add(button);
              button = new JButton("Stop");
              button.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent ev) {
                        try {
                             synth.cancel();
                        catch(ArrayIndexOutOfBoundsException ex) {}
              toolBar.add(button);
              toolBar.addSeparator();
              toolBar.add(new JLabel("Voice:"));
              voices = new JComboBox(model);
              voices.setSelectedItem(preferences.get("voice.selected",""));
              voices.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent ev) {
                        try {
                             synth.deallocate();
                             String str = (String) voices.getSelectedItem();
                             preferences.put("voice.selected",str);
                             synth = Central.createSynthesizer((SynthesizerModeDesc) list.get(str));
                             synth.allocate();
                             synth.resume();
                        catch(EngineException ex) {
                             ex.printStackTrace();
                        catch(AudioException ex) {
                             ex.printStackTrace();
              toolBar.add(voices);
              toolBar.addSeparator();
              button = new JButton("Exit");
              button.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent ev) {
                        try {
                             synth.deallocate();
                        catch(EngineException ex) {
                             ex.printStackTrace();
                        preferences.putInt("voice.mainWindow.x",getLocation().x);
                        preferences.putInt("voice.mainWindow.y",getLocation().y);
                        preferences.putInt("voice.mainWindow.width",getSize().width);
                        preferences.putInt("voice.mainWindow.height",getSize().height);
                        System.exit(1);
              toolBar.add(button);
              getContentPane().add(toolBar,BorderLayout.NORTH);
              final JTextField textField = new JTextField();
              textField.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent ev) {
                        String txt = textField.getText();
                        if(txt.length() > 0) {
                             textArea.append(txt+'\n');
                             synth.speakPlainText(txt, null);
                             textField.setText("");
              getContentPane().add(textField,BorderLayout.SOUTH);
              int x = preferences.getInt("voice.mainWindow.x",1);
              int y = preferences.getInt("voice.mainWindow.y",1);
              int width = preferences.getInt("voice.mainWindow.width",640);
              int height = preferences.getInt("voice.mainWindow.height",480);
              setLocation(x,y);
              setSize(width,height);
              setVisible(true);
         public int compare(Object obj1, Object obj2) {
              SynthesizerModeDesc desc1 = (SynthesizerModeDesc) obj1;
              SynthesizerModeDesc desc2 = (SynthesizerModeDesc) obj2;
              return desc1.getModeName().compareToIgnoreCase(desc2.getModeName());
         public static void main(String args[]) {
              new JavaVoice();
         class AppCloser extends WindowAdapter {
              public void windowClosing(WindowEvent ev) {
                   try {
                        synth.deallocate();
                   catch(EngineException ex) {
                        ex.printStackTrace();
                   System.exit(1);
    ---------------------------------------------------------------------------------------------------------

    use code tags, post the error message.
    http://forum.java.sun.com/help.jspa?sec=formatting

  • Can anyone help me to find the Java Speech API?

    I really need to use the Java Speech API but I don't have any idea where to find it.
    In the Sun page are many implementations of the API but I want to use it and is very important for me.
    Please, can anyone send me the little API...........

    Look at the thread two posts down, that might be what youre looking for. Theres also a thread seven posts down that will help you.

  • Where can i download java speech api?

    Hi All,
    Where can i download java speech api?
    Thanks

    Thanks for the java speech download recommendations. I am going to give it a try on my site.
    [Tony From Sports Betting Picks|http://tonyspicks.com/contact-tony/about/]
    Edited by: tonyt42 on Apr 9, 2009 10:01 PM

  • Java speech api download

    Where I can download JAVA SPEECH API implementation?.
    I have been searching in web, there are many options.
    I'm spanish, please, sorry for my poor english.
    Edited by: Valhalla on Feb 25, 2009 9:03 AM

    follow the below links...
    http://freetts.sourceforge.net/docs/index.php
    http://freetts.sourceforge.net/docs/jsapi_setup.html

  • I want to download  Java Speech API jar file  where can I get that ?

    hi All
    i started development on the Java Speech API. so were i can download the jar file and also if any one having the Maven artifact Id / group Id. please post it.it may helpful for me.
    Thanks
    Jega

    Sun has no such API like Java Speech API in their J2SE but there r other third parties api like FreeTTS which can be used
    to code speech apps.
    http://nchc.dl.sourceforge.net/project/freetts/FreeTTS/FreeTTS%201.2.2/freetts-1.2.2-bin.zip

  • Regarding java mail api

    Hi,
    I tried to implement the mailing system in my application.
    It is giving the following error
    javax.mail.MessagingException: 530 5.7.1 Client was not authenticated
    Can any one tell me the cause of this exception?

    Why is the FAQ so hard to find?
    [http://java.sun.com/products/javamail/FAQ.html#smtpauth|http://java.sun.com/products/javamail/FAQ.html#smtpauth]

  • Java Speech API / Mobile Media API ?

    Does anyone know whether its possible to use JSAPI or MMAPI in mobile phones currently in the market?
    If it aint then I am really surprised because the sound manipulation possible is very useful.

    Hey guys, surely some of you folks must have used it...

  • Speech APIs in java

    Dear All,
    Can any one give brief description on java speech APIs. I want to build an application which recognizes users voice and perform the set of operations. Do i need any special hardware to be installed on my system???? What are the minimum system requirements for this.
    Advance TX for the reply.......

    Dear All,
    Can any one give brief description on java
    n java speech APIs. I want to build an application
    which recognizes users voice and perform the set of
    operations. Do i need any special hardware to be
    installed on my system???? What are the minimum system
    requirements for this.
    Advance TX for the reply.......From: http://java.sun.com/products/java-media/speech/forDevelopers/jsapi-guide/Introduction.html#8184
    1.6 Requirements
    To use the Java Speech API, a user must have certain minimum software and hardware available. The following is a broad sample of requirements. The individual requirements of speech synthesizers and speech recognizers can vary greatly and users should check product requirements closely.
    Speech software: A JSAPI-compliant speech recognizer or synthesizer is required.
    System requirements: most desktop speech recognizers and some speech synthesizers require relatively powerful computers to run effectively. Check the minimum and recommended requirements for CPU, memory and disk space when purchasing a speech product.
    Audio Hardware: Speech synthesizers require audio output. Speech recognizers require audio input. Most desktop and laptop computers now sold have satisfactory audio support. Most dictation systems perform better with good quality sound cards.
    Microphone: Desktop speech recognition systems get audio input through a microphone. Some recognizers, especially dictation systems, are sensitive to the microphone and most recognition products recommend particular microphones. Headset microphones usually provide best performance, especially in noisy environments. Table-top microphones can be used in some environments for some applications.

  • Speech API

    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 compile 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??!!
    Are there jar packages i need to reference in my classpath? wheer are 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();
    }

    * Copyright 2003 Sun Microsystems, Inc.
    * See the file "license.terms" for information on usage and
    * redistribution of this file, and for a DISCLAIMER OF ALL
    * WARRANTIES.
    import com.sun.speech.freetts.Voice;
    import com.sun.speech.freetts.VoiceManager;
    import com.sun.speech.freetts.audio.JavaClipAudioPlayer;
    //import javax.speech.*;
    //import javax.speech.synthesis.*;
    //import java.util.*;
    * Simple program to demonstrate the use of the FreeTTS speech
    * synthesizer. This simple program shows how to use FreeTTS
    * without requiring the Java Speech API (JSAPI).
    public class FreeTTSHelloWorld {
    * Example of how to list all the known voices.
    public static void listAllVoices() {
    System.out.println();
    System.out.println("All voices available:");
    VoiceManager voiceManager = VoiceManager.getInstance();
    Voice[] voices = voiceManager.getVoices();
    for (int i = 0; i < voices.length; i++) {
    System.out.println(" " + voices.getName()
    + " (" + voices[i].getDomain() + " domain)");
    public static void main(String[] args) {
    listAllVoices();
    String voiceName = (args.length > 0)
    ? args[0]
    : "kevin16";
    System.out.println();
    System.out.println("Using voice: " + voiceName);
    /* The VoiceManager manages all the voices for FreeTTS.
    VoiceManager voiceManager = VoiceManager.getInstance();
    Voice helloVoice = voiceManager.getVoice(voiceName);
    if (helloVoice == null) {
    System.err.println(
    "Cannot find a voice named "
    + voiceName + ". Please specify a different voice.");
    System.exit(1);
    /* Allocates the resources for the voice.
    helloVoice.allocate();
    /* Synthesize speech.
    helloVoice.speak("Thank you for giving me a voice. "
    + "I'm so glad to say hello to this world.");
    /* Clean up and leave.
    helloVoice.deallocate();
    System.exit(0);

  • Java Speech + JSP

    Hi
    I'm new to the Java Speech API and JSP. Does anybody know if it is possible to use java speech in jsp pages? Somebody told me if you want to use java speech on the web you need to use applets. It that true?
    Oh yeah, I'm using the FreeTTS implementation from SourceForge.
    Thanks
    jjamesis

    Sorry if this takes up too much space.
    Heres the error when I try to run my applet.
    java.lang.NoClassDefFoundError: javax/speech/EngineModeDesc
         at java.lang.Class.getDeclaredConstructors0(Native Method)
         at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
         at java.lang.Class.getConstructor0(Unknown Source)
         at java.lang.Class.newInstance0(Unknown Source)
         at java.lang.Class.newInstance(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Heres the code for the applet
    import java.io.File;
    import java.util.Locale;
    import java.util.Vector;
    import javax.speech.Central;
    import javax.speech.Engine;
    import javax.speech.EngineList;
    import javax.speech.synthesis.Synthesizer;
    import javax.speech.synthesis.SynthesizerModeDesc;
    import javax.speech.synthesis.SynthesizerProperties;
    import javax.speech.synthesis.Voice;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class SpeechApplet extends JApplet implements ActionListener {
    private JPanel mainPanel;
    private JLabel label;
    private JButton button;
    private JTextField textField;
    Synthesizer synthesizer;
    public void init() {
    label = new JLabel();
    textField = new JTextField(20);
    button = new JButton("Click Me");
    button.addActionListener(this);
    mainPanel = new JPanel(new BorderLayout());
    mainPanel.add(label, BorderLayout.NORTH);
    mainPanel.add(textField, BorderLayout.CENTER);
    mainPanel.add(button, BorderLayout.SOUTH);
    Container c = getContentPane();
    c.add(mainPanel);
    setSize(100, 100);
    try {
    setup();
    } catch (Exception e) {}
    public void setup() throws Exception {
    String voiceName = "keven16";
    SynthesizerModeDesc desc = new SynthesizerModeDesc(
    null, // engine name
    "general", // mode name
    Locale.US, // locale
    null, // running
    null); // voice
    synthesizer = Central.createSynthesizer(desc);
    synthesizer.allocate();
    synthesizer.resume();
    desc = (SynthesizerModeDesc) synthesizer.getEngineModeDesc();
    Voice[] voices = desc.getVoices();
    Voice voice = null;
    for (int i = 0; i < voices.length; i++) {
    if (voices.getName().equals(voiceName)) {
    voice = voices[i];
    break;
    synthesizer.getSynthesizerProperties().setVoice(voice);
    public void speak(String input) throws Exception {
    synthesizer.speakPlainText(input,null);
    synthesizer.waitEngineState(Synthesizer.QUEUE_EMPTY);
    public void actionPerformed(ActionEvent ae) {
    try {
    String input = textField.getText();
    label.setText(input);
    } catch (Exception e) {}

  • Java Speech & Java Telephony

    hi all,
    i am new to java speech & java telephony, i need to know form where to get these two apis. after getting these two apis what are the necessary steps required to run a program. please any one help me out with one example step by step.
    thanks & regards
    dkumar_sharma

    Follow these links:
    http://java.sun.com/products/jtapi/
    http://java.sun.com/products/java-media/speech/
    http://java.sun.com/marketing/collateral/speech.html
    http://java.sun.com/products/java-media/speech/forDevelopers/jsapi-guide/index.html

  • Java mail api - sending mails to gmail account

    Hello
    I am using java mail api to send mails.when i send mails to gmail from ids which are not in gmail friends list, most of the mails are going to spam.Ofcourse, some of them go to inbox.I tried in lot of ways to analyse the problem.But nothing could help. Can anyone plzz tell me how to avoid mails going to spam in gmail, using java mail api?
    Thank you in advance,
    Regards,
    Aradhana
    Message was edited by:
    Aradhana

    am using the below code.
    Properties props = System.getProperties();
    //          Setup mail server
              props.put("mail.smtp.host", smtpHost);
              props.put("mail.smtp.port","25");
              props.put("mail.smtp.auth", isAuth);
         Authenticator auth = new UserAuthenticator();
    //          Get session
              Session s = Session.getDefaultInstance(props,auth);
    //          Define message
              Message m = new MimeMessage(s);
    //          setting message attributes
              try {
                   m.setRecipient(Message.RecipientType.TO, new InternetAddress(to));
                   InternetAddress f_addr=new InternetAddress(from);
                   f_addr.setPersonal(personalName);
                   m.setFrom(f_addr);               
                   m.setSubject(subject);
                   m.setSentDate(new Date());
                   m.setContent(msg,"text/plain");
                   m.saveChanges();
    //               send message
                   Transport.send(m);
    Message was edited by:
    Aradhana

  • Performance issue with Business Objects Java JRC API in CRXI R2 version

    A report is developed using java JRC API in CR XI release 2. When I generate the report in the designer, it took less than 5 seconds to display the results in crystal report viewer inside the designer. But in the QA environment, when I generate the same report from the application, it takes almost 1 to 1.5 minutes to display the same results in PDF. I also noticed that if the dataset contains bigger volume of data, then the reports are taking even longer almost 15 to 20 minutes.
    While generating the report from the application, I noticed that most of time is taken during the execution of the com.crystaldecisions.report.web.viewer.ReportExportControl Object method as shown in following line of code
    exportControl.processHttpRequest(request, response, context, null)
    We thought the delay in exporting the report to PDF might be the layout of the report and data conversion to PDF for such a bigger volume of data.
    Then we investigated the issue and experimented quickly to generate the same report with same result set data from the application using XML, XSL and converted the output XSL-FO to PDF using Apache FOP (Formatting Objects Processor) implementation. The time taken to export the report to PDF is less than 6 seconds. By doing this experiment, it is proved that the issue is not with conversion of data to PDF but it is the performance problem with Business Objects Java JRC API in CR XI R2.
    In this regard, I searched for the above issue in the SAP community Network Forums -> Crystal Reports and Xcelsius -> Java Development -> Crystal Reports. But I did not find any answers or solutions for this kind of issue in the forums.
    Any suggestion, hint in this matter is very much appreciated.

    Ted, The setReportAppServer problem is resolved. Now I could able to generate the report with hardcoded values in the SQLs in just 6 seconds where as the same report was generated in CRXI R2 in 1 minute 15 seconds as mentioned in the earlier message.
    But, our exisiting application passes the parameter values to the SQLs embedded in the report. For some reason the parameters are not being passed to the report and the report displays only the labels without data.
    As per the crj 12 samples codes, the code is written as shown below.
    1. Created ReportClient Document
    2. SetReportAppServer
    3. Open the report
    4. Getting DatabaseController and switching the database connection at runtime
    5. Then setting the parameters as detailed below
    ParameteFields parameterFieldController = reportClientDoc.getDataDefController().getParameterFieldController();
    parameterFieldController.setCurrentValue("", "paramname",paramvalue);
    parameterFieldController.setCurrentValue("", "paramname",paramavalue);
    byteArrayInputStream = (ByteArrayInputStream)reportClientDoc.getPrintOutputController().export(ReportExportFormat.PDF); 
    6. Streaming the report to the browser
    Why the parematers are not being passed to the report?  Do I need to follow the order of setting these parameters?  Did I miss any line of code for setting Params using  crj 12?
    Any help in this regard would be greatly appreciated.

  • How can i access gmail's smtp server using java mail api

    i m using java mail api to access gmails pop and smtp service to receive and send mail from ur gmail account. I m able to access gmails pop server using the ssl and port 995 , but i can not use its smtp server to which i m connecting using ssl on 465 port. It requires authentication code.
    if anybody can help me in this regard i m thnkful to him/her.
    thnks in advance.
    jogin desai

    Here's an example of using SSL + Authentication
    http://onesearch.sun.com/search/onesearch/index.jsp?qt=ssl+authentication&subCat=siteforumid%3Ajava43&site=dev&dftab=siteforumid%3Ajava43&chooseCat=javaall&col=developer-forums

Maybe you are looking for