Cloudgarden's Discussion Board
Forums: Search: Several forums are available for people to post questions/comments about Java Speech or any of the CloudGarden products. As more messages are posted this discussion board should provide a useful, searchable, support database.
o AliceTalker (42)
o JSAPI Projects (69)
o Java Speech API (857)
o Jigloo GUI Builder for Eclipse (3322)
o SwingScroller (0)
o US Election 2004 (3)
Searches text and subject fields in all forums. The search matches as many words as possible. Don't use "AND" or "OR".
Latest "AliceTalker" Topics [ Start new "AliceTalker" Topic  ]

Cloudgarden Discussion Board  
This topic has 1 reply.       [ << Previous Topic | Start of Thread | >> Next Topic ]
I am trying to do something if I say?show?.
Author: Merman
04/06/03 10:20 Reply
Thank you very much for the answer. It works!
Now I am trying to do something if I say?show?.
When I receive the words in sendText(String text)

If(text==?show?) never works????????? Why?

if (comp.compareTo(seccomp)==0) It works but not when I speak in microphone.

private void sendText(String text) {
     String comp = "show";
     String seccomp = text;
     String mytext = text;

     if ((comp.compareTo(seccomp)==0) || (comp.compareTo(seccomp)==-1)) {
          mytext = " I am in the function?
     }
logText(">>You: "+text+" "+mytext+"\n");
client.send(text);
}
It works but sometimes not.

Re: I am trying to do something if I say?show?.
Author:Jonathan
Reply 1 of 104/06/03 10:32Reply
To see if text equals "show", use

text.equals("show")

To see if "show" occurs inside of text, use

text.indexOf("show") > 0