4 Replies Latest reply: Jul 31, 2008 1:32 PM by 843802 RSS

    Speech to Text

      Hi Frds,
      Can any one help me how to write a program for speech to text. I am having freetts and Talking java(from cloudgroun) packages. Can any one help me what to do.
      Plz, Send me mail at chandru155@yahoo.com
        • 1. Re: Speech to Text
          Did you find a solution for converting speech to text?i am also tyring to do this and want my application to print what i say in text fields but so far i cannot figure it out!!!!help!!!
          • 2. Re: Speech to Text
            I don't know how much help this will be but i have something that can start you off from long ago
            import java.awt.event.*;
            import java.io.*;
            import javax.swing.*;
            import java.awt.*;
            import javax.media.*;
            import java.applet.*;
            import sun.audio.AudioPlayer;
            import sun.audio.AudioStream;
            import java.text.MessageFormat;
            import java.util.*;
            public class MainClass extends JFrame  implements ActionListener {
              JTextField jtf = new JTextField(15);
             // jtf.setText(".");
              public MainClass() {
            JPanel jp = new JPanel();
            jp.add(jtf, BorderLayout.NORTH);
            public void actionPerformed(ActionEvent ae) {
            if (jtf.getText().equals("open"))
                    AudioStream song = new AudioStream(new FileInputStream(new File("open.wav")));
                                              catch(Exception ex)
              public static void main(String[] args) {
               MainClass frame = new MainClass();
                //jp.getContentPane().add(new MainClass());
                frame.setSize(200, 200);
            save a file called open.wav so wen u type open in textfield it should output open audio, unfortunately this will only work a word at a time. hope i helped
            • 3. Re: Speech to Text
              umm ahmed_mo, your code is for

              text --> speech

              he asks for

              speech --> text


              btw a good speech to text implementation is Sphinx4
              [Sphinx4 Homepage|http://cmusphinx.sourceforge.net/sphinx4/]

              they have some code examples, which you can use

              Edited by: NeoSniperkiller on 23-mei-2008 10:57
              • 4. Re: Speech to Text
                I used that Sphinx. But i cant write a effiecient program. It works for some times, but mostly it doest recognize my voice.
                Can you help with any other one?