void setup() { size(1350,700); g = new GUIController(this); t = new GUIController(this); go = new IFButton ("GO!", 600, 400, 100, 20); fact = new IFButton ("Factorial", 620, 400); go.addActionListener(this); fact.addActionListener(this); textfield=new IFTextField("",620,350); t.add(fact); t.add(textfield);
//goLook = new IFLookAndFeel(this, IFLookAndFeel.DEFAULT); //goLook.baseColor = color(180); //goLook.highlightColor = color (80); //c.setLookAndFeel(goLook); //c.setHeight(50); g.add (go); r = new GUIController (this); restart = new IFButton ("Restart", 1170, 620, 100, 20); restart.addActionListener(this); r.add(restart); font=loadFont("ArialRoundedMTBold-60.vlw"); textFont(font); t.setVisible(false); r.setVisible(false); }
void draw() { smooth(); if(f1==0) { fill(0); //choice.setVisible(false); background(70,150,20); textSize(60); text("Let's learn about recursion",260,300); textSize(40); text("In Computer Science",480,350); //c.setVisible(false); //for(int i=3;i<93;i++) } if(f1==1) { background(70,150,20); stroke(0); strokeWeight(4); textSize(50); text("Enter a number from 1 to 4 to find its factorial",150,300); } if(f1==2) { if(num==1) { background(255); textSize(40); text("Factorial of 1 = 1",200,350); } }
I want to make a project with processing that can identify what the user says through a microphone. For example if the user says "yes", then perform a set of actions and if the user says "no" then perform another set of actions. Is there any library that would let me achieve this? Any help will be appreciated.