Si, he hecho una prueba con el siguiente código:
Gracias su interés
[MOD] para publicar código usar las etiquetas GeSHi
Código (java) [Seleccionar]
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package sonido;
import java.util.Locale;
import javax.speech.Central;
import javax.speech.synthesis.Synthesizer;
import javax.speech.synthesis.SynthesizerModeDesc;
/**
*
* @author pcx
*/
public class SonidoSp {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
try {
// Set property as Kevin Dictionary
System.setProperty(
"freetts.voices",
"com.sun.speech.freetts.en.us"
+ ".cmu_us_kal.KevinVoiceDirectory");
// Register Engine
Central.registerEngineCentral(
"com.sun.speech.freetts"
+ ".jsapi.FreeTTSEngineCentral");
// Create a Synthesizer
Synthesizer synthesizer
= Central.createSynthesizer(
new SynthesizerModeDesc(Locale.US));
// Allocate synthesizer
synthesizer.allocate();
// Resume Synthesizer
synthesizer.resume();
// Speaks the given text
// until the queue is empty.
synthesizer.speakPlainText(
"hola esto es carnaval tu p**a madre", null);
synthesizer.waitEngineState(
Synthesizer.QUEUE_EMPTY);
// Deallocate the Synthesizer.
synthesizer.deallocate();
}
catch (Exception e) {
e.printStackTrace();
}
}
}
Gracias su interés
[MOD] para publicar código usar las etiquetas GeSHi