import java.io.*;
import java.util.Locale;
import javax.speech.*;
import javax.speech.recognition.*;
public class jsgf_exemplo1 {
static RuleGrammar testeGrammar;
static RuleGrammar notDefinedGrammar;
static Recognizer recognizer;
static ResultListener ruleListener =
new ResultAdapter() {
// accepted result
public void resultAccepted(ResultEvent e) {
try {
FinalRuleResult result = (FinalRuleResult) e.getSource();
String tags[] = result.getTags();
//join all tags in the same buffer
StringBuffer SB_comando = new StringBuffer();
// Append each recognized token
for(int i=0;i