views:

11

answers:

1

ERROR ARE COMING LIKE THIS ----------------------------

System property "mbrola.base" is undefined.  Will not use MBROLA voices.

PROGRAM -------

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", null);

// Wait till speaking is done

synth.waitEngineState(Synthesizer.QUEUE_EMPTY);

// Clean up

synth.deallocate();

} 
catch (Exception e)
 {
e.printStackTrace();
}

}

}

PLEASE HELP ME .....I AM NEW FOR THIS

A: 

Your code needs MBROLA app which is in the system. So you need to tell you app that MBROLA is here:

  1. From command line or eclipse launch configuration: -Dmbrola.base=/location/to/mbrola OR
  2. System.setProperty("mbrola.base", Morbola.class.getName()) and put the mbrola JAR is the classpath.

See this similar question

(You can use any one of the solution)

zengr