Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Speech to text

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
any one give me solutions for speech to text in java
 
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

Some useful information might be found here and here.
It includes JSAPI FAQ and Speech recognition topic.


Regards,
Oleg.
 
vasanth raman
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks i already tried javax.speech.recognition
while executing that program it will show the null pointer exception
 
Rancher
Posts: 43027
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
While the information you gave about what you tried is extremely limited, I'm guessing that you didn't install a speech recognition engine. The javax.speech API doesn't come with one, and to my knowledge there isn't one freely available - you may have to opt for a commercial solution.
 
vasanth raman
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is the code i am using speech to text i have installed micro-soft speech engine when i run this code it show null pointer exception in rec.allocate(); line
import javax.speech.*;
import javax.speech.recognition.*;
import java.io.FileReader;
import java.util.*;

public class HelloWorld extends ResultAdapter {

public static void main(String args[]) {
try {
// Create a recognizer that supports English.
rec = Central.createRecognizer(new EngineModeDesc(Locale.ENGLISH));
// Start up the recognizer
rec.allocate();

} catch (Exception e) {
e.printStackTrace();
}
}
}
 
Ulf Dittmer
Rancher
Posts: 43027
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does that mean that "rec" is null? If so, consult the documentation for the circumstances under which Central.createRecognizer returns null.

Also make sure that the speech engine is installed in a way so that JSAPI can find and use it.
 
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic