Olá a todos,
Venho aqui pedir ajudos dos caros amigos com uma duvida cruel que estou tendo.
Estou tentando fazer uma aplicação na qual quero utilizar reconhecimento e sentetizamento de voz, procurei no google, o que eu achei foi o site do “Aquiles” que é o unico que explica + o - como utiliza “http://aquilesburlamaqui.wikidot.com/javaspeech”
mas eu tive muitas dificildade para fazer os passos e no final não compreendi como usar, ele explica a instalação e tudo mais, mas não ensina como utilizar a classe, quem poder me ajuda com mensagens mais dinamicas desde já agradeço muito.
Desde já agradeço a pessoa de bom coração que puder me ajudar.
cara esse blog é muito legal ele explica bem olha tem dois tutoriais usando o comando de voz http://wehavescience.com/category/java-2/reconhecimento-e-sintese-de-voz/
testei aqui, e esta funcionando bem, segue:
package br.com.robotvoice;
import com.cloudgarden.speech.userinterface.*;
import javax.speech.*;
import javax.speech.synthesis.*;
/**
* Demonstrates simple speech synthesis
*/
public class HelloWord {
public static void main(String[] args) {
Synthesizer synth = null;
try {
SynthesizerModeDesc desc = null;
SpeechEngineChooser chooser = null;
// try {
// chooser = SpeechEngineChooser.getSynthesizerDialog();
// chooser.show();
// desc = chooser.getSynthesizerModeDesc();
// } catch (NoClassDefFoundError e) {
// System.out.println("Can't find Swing - try using Java 2 to see the SpeechEngineChooser");
// }
synth = Central.createSynthesizer(desc);
((com.cloudgarden.speech.CGEngineProperties) synth.getSynthesizerProperties()).setEventsInNewThread(false);
synth.addEngineListener(new EngineListener());
SpeakableListener spList = new SpeakableListener();
synth.addSpeakableListener(spList);
synth.allocate();
synth.resume();
synth.waitEngineState(Synthesizer.ALLOCATED);
Voice v = null;
if (chooser != null) {
v = chooser.getVoice();
}
//Get a female voice if the chooser was not created or no voice was selected
if (v == null) {
new Voice(null, Voice.GENDER_FEMALE, Voice.AGE_DONT_CARE, null);
}
System.out.println("Usando voz " + v);
SynthesizerProperties props = synth.getSynthesizerProperties();
props.setVoice(v);
props.setVolume(10.0f);
props.setSpeakingRate(150.0f);
synth.speak("", null);
synth.waitEngineState(synth.QUEUE_EMPTY);
synth.speak("Ajuda Sintetizador de Voz Java "Java Speech API"", null);
synth.waitEngineState(synth.QUEUE_EMPTY);
Thread.sleep(3000);
synth.speak("bla bla bla bla... ", null);
synth.waitEngineState(synth.QUEUE_EMPTY);
} catch (Exception e) {
e.printStackTrace(System.out);
} catch (Error e1) {
e1.printStackTrace(System.out);
} finally {
try {
synth.deallocate();
synth.waitEngineState(synth.DEALLOCATED);
} catch (Exception e2) {
}
System.exit(0);
}
}
}
onde eu baixo a biblioteca ?
Como faço para que funcione em um projeto JSF?
Andei pesquisando e não achei nada a respeito, alguém tem uma implementação dessa API em JSF?