free download speech to text conversion in java open source code
#1

i need speech to text conversion in java with source code
Reply
#2

free download speech to text conversion in java open source code

package speechtotext;

import edu.cmu.sphinx.frontend.util.Microphone;
import edu.cmu.sphinx.recognizer.Recognizer;
import edu.cmu.sphinx.result.Result;
import edu.cmu.sphinx.util.props.ConfigurationManager;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.*;


public class HelloWorld extends JApplet implements ActionListener{

private JButton b1 = new JButton("SPEAK"), b2 = new JButton("STOP");
JTextArea textArea = new JTextArea(7,30);
Result result;
ConfigurationManager cm;
Recognizer recognizer;
Microphone microphone;
String resultText ;

public void init() {
Container cp = getContentPane();
cp.setLayout(new FlowLayout());
Image image = Toolkit.getDefaultToolkit().createImage("C:\\Users\\arsa\\Desktop\\1.png");
Image scaled = image.getScaledInstance(300, 550, Image.SCALE_SMOOTH);
JLabel label = new JLabel(new ImageIcon(scaled));
cp.add(label,BorderLayout.CENTER);
textArea.setText("");
textArea.setLineWrap(true);
textArea.setEditable(false);
add(textArea,"Center");
cp.add(b2,FlowLayout.LEFT);
cp.add(b1,FlowLayout.LEFT);
cp.add(textArea);
b1.addActionListener(this);
b2.addActionListener(this);
cm = new ConfigurationManager(HelloWorld.class.getResource("helloworld.config.xml"));
recognizer = (Recognizer) cm.lookup("recognizer");
System.out.println("Successful1 allocation");
recognizer.allocate();
System.out.println("Successful1 allocation1");
microphone = (Microphone) cm.lookup("microphone");
if (!microphone.startRecording()) {
System.out.println("Cannot start microphone.");
recognizer.deallocate();
System.exit(1);
}
}
@Override
public void actionPerformed(ActionEvent e) {
String str=e.getActionCommand();
if (e.getSource() == b1)
{
result = recognizer.recognize();
}
else if (e.getSource() == b2)
{
if (result != null) {
resultText = result.getBestPronunciationResult();
if(resultText!=null)
textArea.setText("You said: " + resultText + '\n');
else if(resultText==null)
textArea.setText("I couldn't hear what you said.\n");
}
else if(result==null)
textArea.setText("Cheater!! Cheater!! you didn't say anything....\n");
}
}
Reply

Important Note..!

If you are not satisfied with above reply ,..Please

ASK HERE

So that we will collect data for you and will made reply to the request....OR try below "QUICK REPLY" box to add a reply to this page
Popular Searches: adobe pdf free conversion, nfa to dfa conversion program in java, speech to text software download, open source technology ppt download, basys2 open code, open source code for anfis, matlab code for text to speech conversion,

[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Please enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)

Possibly Related Threads...
Thread Author Replies Views Last Post
  power plant instrumentation by krishnaswamy pdf free download 3 23,766 10-02-2019, 07:00 PM
Last Post:
  karmakshetra epaper in bengali this week pdf free download 5 12,918 01-02-2019, 11:28 PM
Last Post:
  optical networks by rajiv ramaswami free download 3 11,234 20-11-2018, 07:25 AM
Last Post:
  simple java rmi chat application source code 2 18,974 20-07-2018, 12:08 PM
Last Post: Guest
  free download machine design 2 jbk das book pdf 2 11,015 30-05-2018, 11:39 AM
Last Post: [email protected]
  authentication schemes for session passwords using color and images project source code 2 2,231 03-02-2018, 09:35 AM
Last Post: Nischithnash
  free download internal combustion engine by mathur sharma pdf 3 9,456 26-12-2017, 10:41 AM
Last Post: jaseela123d
  design of machine elements by jbk das pdf free download 4 11,682 04-12-2017, 03:07 PM
Last Post: jaseela123d
  vlsi textbook pdf by bakshi free download 4 9,517 25-10-2017, 03:02 PM
Last Post: pinky
  veta spoken english books pdf free download 3 2,148 20-09-2017, 07:33 AM
Last Post: Guest

Forum Jump: