Jsapi speehc synthesizer and recognizer

Hello friends, Have any one of u done a project on speech synthesizer and recognizer using jsapi and Freetts...???

(contd..) to previous thread step5
//testing
u can find so many examples in the net though iam giving one below!!
Class name is Main.java
code follows
package tts; // my package
import java.util.Locale;
import javax.speech.Central;
import javax.speech.synthesis.Synthesizer;
import javax.speech.synthesis.SynthesizerModeDesc;
import javax.speech.synthesis.Voice;
import java.io.*;
import java.lang.*;
* @author Administrator
public class Main {
* @param args the command line arguments
public static void main(String[] args) {
System.out.println("args==" + args.toString());
String voiceName = (args.length > 0)
? args[0]
: "kevin16";
voiceName = new String("kevin16");
System.out.println("Voice Name is :" + voiceName);
//System.out.println("Using voice: " + voiceName);
try {
System.out.println("---1---");
/* Find a synthesizer that has the general domain voice
* we are looking for. NOTE: this uses the Central class
* of JSAPI to find a Synthesizer. The Central class
* expects to find a speech.properties file in user.home
* or java.home/lib.
* If your situation doesn't allow you to set up a
* speech.properties file, you can circumvent the Central
* class and do a very non-JSAPI thing by talking to
* FreeTTSEngineCentral directly. See the WebStartClock
* demo for an example of how to do this.
SynthesizerModeDesc desc = new SynthesizerModeDesc(
null, // engine name
"general", // mode name
Locale.US, // locale
null, // running
null); // voice
System.out.println("--2--");
Synthesizer synthesizer = Central.createSynthesizer(desc);
/* Just an informational message to guide users that didn't
* set up their speech.properties file.
System.out.println("--3--");
if (synthesizer == null) {
System.out.println("--3(1)--");
// System.err.println(noSynthesizerMessage());
System.exit(1);
System.out.println("--4--");
/* Get the synthesizer ready to speak
synthesizer.allocate();
synthesizer.resume();
/* Choose the voice.
desc = (SynthesizerModeDesc) synthesizer.getEngineModeDesc();
Voice[] voices = desc.getVoices();
Voice voice = null;
System.out.println("Length :" + voices.length);
for (int i = 0; i < voices.length; i++) {
if (voices.getName().equals(voiceName)) {
voice = voices[i];
System.out.println("voice " + voice);
break;
if (voice == null) {
System.err.println(
"Synthesizer does not have a voice named " + voiceName + ".");
System.exit(1);
synthesizer.getSynthesizerProperties().setVoice(voice);
System.out.println("going 2 play");
/* The the synthesizer to speak and wait for it to
* complete.
//synthesizer.speakPlainText("Hello world!,iam vijay testing Freetts", null);
String str = new String("heloo world");
System.out.println("String is ....: " + str);
synthesizer.speakPlainText(str, null);
synthesizer.waitEngineState(Synthesizer.QUEUE_EMPTY);
/* Clean up and leave.
synthesizer.deallocate();
System.exit(0);
} catch (Exception e) {
e.printStackTrace();
// TODO code application logic here
@Override
protected Object clone() throws CloneNotSupportedException {
return super.clone();
@Override
public boolean equals(Object obj) {
return super.equals(obj);
@Override
protected void finalize() throws Throwable {
super.finalize();
@Override
public int hashCode() {
return super.hashCode();
@Override
public String toString() {
return super.toString();
here we are using Kelvin16 as voice type..
still u have any problem during the running ... let me know

Similar Messages

  • I'm getting a new iPod touch 4G to replace my old 1st gen. pod.  How do I get iTunes to get rid of my old iPod and recognize the new iPod and can I sych the new pod and get all of the content on it from my old pod?

    Hi-
    Oops. looks like I hasked the whole question in the headline, but... How does this work?  When I connect my new pod to iTunes how do I get iTunes to recognize the new pod, disregard the old pod and transfer my content to my new pod?  Also, I have a G5 that runs 10.4.11 OS.  Will the new pod synch to this computer running this old software yet.  Apparently, I have to "climb the mountain" to find a copy of Leopard for G5 and I apparently cannot run Snow Leopard.  What are the needs or restrictions for synching a 4th Gen iPod touch?
    Thanks-
    DMitz

    The 4G iPod needs at least OSX 10.5.8 on a Mac. You are right that the G5 can't use OSX 10.6 or later. Apple will sell you a 10.5.8 disk but you have to call them since it is not listed in their on-line store.  Price is $129.
    For 4G specs:
    System requirements
    USB 2.0
    iTunes 10.1 or later6
    Mac: Mac OS X v10.5.8 or later
    PC: Windows 7, Windows Vista, or Windows XP Home or Professional (SP3) or later
    Broadband Internet access required; fees may apply.

  • Import and recognize class error

    The following is a simple welcome.jsp file that I am trying to run on a local J2EE sever. As you can see it tries to import classes one being the FaqCategories.class which is located in the folder Ch03 of the WEB-INF directory. When I call the page up on the browser It gives me that it does not recognize the FaqCategories faqs = new FaqCategories; class error. I am wondering why(Is the import statement wrong? Did I put the class in the wrong directory? Etc... I followed everything the book told me to a que and I still received an error.
    <&@ page errorPage="/WEB-INF/errorPage.jsp"
             import="java.util.Iterator,Ch03.FaqCategories" %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
      <head>
         <title>Java FAQ Welcome Page</title>
       </head>
       <body>
         <h1>Java FAQ Welcome Page</h1>
         Welcome to the Java FAQ
      <%! FaqCategories faqs = new FaqCategories(); %>
      Click a link below for answers to the given topic.
      <%
        Iterator categories = faqs.getAllCategories();
        while(categories.hasNext()) {
           String category = (String) categories.next();
       %>
          <p><a href="<%= replaceUnderscore(category) %>.jsp"><%= category
       %></a></p>
       <%
        %>
       <%@ include file="/WEB-INF/footer.jspf" %>
          </body>
         </html>
          <%!
           public String replaceUnderscore(String s) {
             return s.replace(' ','_');
           %>

    Originally posted by: nadeem.aboobaker.bea.com
    "Walter Harley" <[email protected]> wrote in message
    news:f2jet7$na1$[email protected]..
    > "Nadeem Aboobaker" <[email protected]> wrote in message
    > news:f2j2au$fi6$[email protected]..
    >> Hello all,
    >>
    >> I am having issues creating a plugin as a JAR file, where the plugin
    >> contains a nested JAR file.
    >
    >
    > Hey, Nadeem.
    >
    > Yes, there are a lot of problems with trying to use nested jars in (and
    > out of) Eclipse. You can look at
    > https://bugs.eclipse.org/bugs/show_bug.cgi?id=145001 as a sort of
    > "umbrella" bug report that mentions some of the issues and refers to other
    > bugs. There is more than one limitation at work, so describing the issues
    > succinctly is difficult. As you noticed in the posting from a year ago,
    > the only way to make it work really smoothly is to get rid of the nested
    > jars by expanding them (and even then, there are issues with nested .class
    > files!).
    >
    > If it is at all possible to convert the nested .jar into a separate
    > plug-in (by adding an OSGi-compliant MANIFEST.MF) and make your primary
    > plug-in depend on it, instead of trying to nest the jar within your
    > primary plug-in, that will be your best and most "Eclipse-friendly"
    > answer.
    >
    > Feel free to contact me offline or here on the newsgroup if needed.
    >
    > -walter
    Walter, thanks for the reply. Converting the nested .jar into a sepearate
    plug-in isn't possible for my case. I checked out the Bug report, and also
    the referenced bugs and Wiki page, it was interesting to read all the
    issues. :) In any case, I know that deploying the plugin as a directory
    instead of a jar works, so I will just go with that approach.
    - Nadeem

  • Why my macbook pro 7.1 does not recognize 2x4 GB of ram (PNY), I already tried 1 by 1 and recognize up to 6? What it's wrong

    Hello, I updated my RAM from 4 to 8, the problem is that does not recognize the 8 GB, I tried one by one, and only recognize 6 GB (one module of 2 and one module of 4) but by the time I install both, it doesn`t work. (I updated the firmware also) 

    If you substute each 4GB card, do you still have the system recognizing 6GB? Since it's not recognizing all 8GB, that suggests an issue with that memory ... is that what PNY says should be used in a MBP?  While I haven't used PNY memory, they do have a line that they say is for Apple computers here. Is that what you used?  I normally use Crucial or OWC (their own branded memory or Samsung) which have worked well over a number of systems.

  • TS2755 I received an error message after texting, unsuccessfully to a number w/o the area code. After adding the area code and trying again, the messaging app won't forget the seven-digit number and recognize the added area code.

    I have deleted the contact, rebooted, changed the contact name and added the ten-digit number. Send Message reverts to the old contact name, refusing to recognize the new contact name, or the ten-digit number. How do I overcome this sticky piece of messaging memory? I have an iPhone 4 with iOS7.

    The fix for this problem is easy and is set out here: http://edctips.blogspot.com/2014/09/fixing-iphone-texting-problem.html

  • Itunes will not popup and recognize Ipad air after initial setup. Advice?

    I was installing a new ipad air to replace a lost and erased one. It was downloading apps and content as expected. I stepped away for a couple of hours. Now it shows the design directing you to connect to itunes. When I connect it to the laptop, Itunes does not popup or recognize the ipad and the ipad does not open. will not open up. The screen with the design directing connection to Itunes persists. Advice?

    That means that the iPad iOS software has to be restored and you will need to try recovery mode now.
    If you can't update or restore your iOS device - Support - Apple

  • HT201514 My Time Capsule/Router will not recognize the other Apple wireless devices that I own.  The older Air Port goes online immediately and recognizes each one by name.  The Time Capsule/Router does not finish the start up--long yellow flashing light.

    I recently purchased a MacBook Air and an Airport Time Capsule.  The Time Capsule does not recognize my old iPhone, my old iPod Touch and my new MacBook Air.  The old AirPort Extreme works perfectly on the network, so I know it's not my internet.  It also recognizes all my devices by name and hooks them up to the internet.  Is the Time Capsule broken or is there some secret trick I need to know to get it to work?
    Ellen H.

    Check the Ethernet connection to the AirPort Express. Make sure that the Ethernet connection from the Comcast modem is connected to the WAN port on the back of the AirPort Express. The WAN port is the one with the circle of dots shown over the port.
    It sounds like you are connected to the Ethernet LAN port.

  • I connect my ipod to my pc and recognize it like camera foto

    dosnt recognize it,like camera foto

    - It is normal and expect for the computer to see the iPod as a camera since that is how you get fohotos from the iPod to the camera.
    - I really do not understandy your problem. The subject line say the computer sees it as a computer.  The body imples that it does not see it as a camera.
    - If the iPod does not include in iTunes on your computer see:
    iPhone, iPad, or iPod touch: Device not recognized in iTunes for Windows

  • Opening synthesizer and drum machine

    I'm trying Logic Pro for the first time and i find the interface a bit confusing, for example i can't find any way to open the drum machine and the synthesizer, can someone help me with this simple question please?

    I would really encourage you to read the manual.
    Begin at the beginning and take it slow.
    Logic is a powerful program that can do virtually anything you imagine. But, like most applications that have sophisticated capabilities, it's not going to be automatic.
    Take your time.
    Open Logic, and go through the beginning chapters of the beautifully re written "Getting Started with Logic" manual. Do everything it talks about...
    If you have any questions about what you learn, read, or discover about your system bring them here and we'd all probably love to one up each other answering your questions.
    Many of us learn more all the time by helping people who are working hard at helping themselves.
    It totally goes both ways.
    I just can't stress enough how essential it is that you open that manual with the program running and learn the core ideas of Logic and what it's capable of.
    enjoy!

  • Can see and recognize my wireless network and Internet is working, but I can't connect with ANY computers/iPad/iPod/air TV, etc. I have reset the time machine several times, and can see the network, but cannot access it with any device. PLEASE HELP!

    I have Comcast Internet and have it connected to a Motorla Surfboard modem and have that running directly to a 2TB Time Capsule. The TC is serving as our time machine as well as our wireless router. We lost power in a storm a week ago and can no longer connect to my wireless network I can see the network and sign into it via password, but cannot connect with any device(iMac, MacBook, iPhones, iPod touches, air tv, etc.). ALL of these devices worked gat before the power went out. I reset both modem and TC and still can't connect. I can connect to the Internet through Ethernet cord directly from the modems dn have confirmation(per Comcast service) that the Internet is working and we have a good connection.
    The TC is less than six months old so I'm not sure what is wrong. I have reset settings with TC to no avail. I have reset the TC SEVERAL times and have no idea what could be wrong and what is prohibiting me from connecting. Anyone that has ANY suggestions or ideas as to how to fix this, PLEASE HELP!!!  I'm going crazy using iPad 3G and not being able to connect to our wifi. THANKS FOR YOUR TIME AND I LOOK FORWARD TO GETTING BACK TO THE 21ST CENTURY! 

    Anyone have any ideas or information to help with this?  Any help and consideration is MUCH appreciated.

  • HT4628 My ipad and iphone connect and recognize wifi signal, but my mac pro running 10.6.8 does not  recognize or list the wiifi signal as option, any ideas?

    Hi,
    In Austria, iphone and ipad "see" and connect to wifi signal no problem but mac pro in same room will not even allow me to choose the same wifi signal.  It seems almost blocked.  Havectried everything it seems by restarting, deleting preferred accoints, etc.  software is updated but running osx 10.6.8
    Thanks for any help!

    Try the basics first:
       Change your router channel number.  Most times this works & is all you have to do.
    Disconnect & reconnect your modem.  unplug it for about 10 seconds.  Plug it back in.  Do the same for Apple’s routers.  Wait for everything to reboot.
    System Preferences>Network
    Click the Assist Me button.
    In the next window that pops up, click the Diagnostic button & do the necessary.
    Research Knowledge Base for network problems that pertain to the OS that is currently installed on your computer.   See these basic networking KB Articles:  http://support.apple.com/kb/HT1401 AirPort troubleshooting guide
    http://support.apple.com/kb/HT2712 Using network locations in Mac OS X
    Manually provided DNS server addresses are higher priority than DHCP's
    http://support.apple.com/kb/HT1714 Solutions for connecting to the Internet, setting up a small network, and troubleshooting
    ============================
    What to do when you can't connect to the Internet
    Also, run the Airport Utility app which is located inside the Utilities folder.
    =====================
    If using a  Linksys router, contact LinkSys Customer Support and/or post in their forums.
    If using Apple's Airport, please re-post over in one of the AirPort Forums.

  • Cant fully install my Novation Nova synthesizer and get it to work, please help!

    Hi,
    Im trying to connect my hardware synth to Logic but it wont playback any of the notes. I can see midinotes getting in thru the keyboard Im using and the sound is getting thru also, but when I playback a recording of midinotes Im not getting any sound from my hardware synth.
    Ive tried different ways to do this but the most simnple way is to add a inst track, load external device and connect my harware synth via my midi interface and soundcard inputs. But still dosent get any playback. What am I doing wrong?
    I hope someone out there can help me with this, thanks!
    BR/ Micke

    Bartimus, I have the same problem. The difference is that I use OS X (MacBook 5,1), have an AirPort Extreme and an AirPort Express. Both are out of work, blinking amber. The moden is OK and I can access internet by wire.
    Hope somebody help us!

  • Firewire doesn't exist and recognize

    firewire doesn;t work, no device is plugged and even in the system profiler firewire voice the contents is nothing

    ditto here! did u find any solution for this or turn it in?

  • My ipod touch 4 wont turn on and recognize it, my ipod touch 4 wont turn on and recognize it

    it won't get in recovery, hardreset won't work and it doesn' charge and recorgnize by a mac and pc
    my ipod touch screen stays black

    Try:
    iOS: Not responding or does not turn on
    If not successful, make an appointment at the Genius Bar of an Apple store.
    Apple Retail Store - Genius Bar

  • How do I get iTunes on a new computer to recognize and use my files on the local drive?  My music files on iCloud have been recognized.

    My old computer failed.  All files, including iTunes were backed up on a separate drive.  All files have been loaded on the new computer.  iTunes was reloaded, and recognizes all files on iCloud, but does not link to the files on the computer.  How can I re-establish that linkage?

    Hello jzinser,
    I am not sure on how you reset up your iTunes library on your new computer. If you copied the music by dragging on top of iTunes, then the media would have been put into the proper location. If you have the media copied to your computer and have not established in iTunes where it sits, then you will need to do that within the preferences in iTunes. Take a look at the articles below for more information to help sort this out. 
    iTunes for Windows: Moving your iTunes Media folder
    http://support.apple.com/en-us/HT201543
    Locate and organize your iTunes files
    http://support.apple.com/en-us/ht1391
    Regards,
    -Norm G. 

Maybe you are looking for