} catch (Exception e) {
e.printStackTrace();
}
// start the microphone or exit if the programm if this is not possible
Microphone microphone = (Microphone) cm.lookup("microphone");
if (microphone == null || !microphone.startRecording()) {
System.out.println("Cannot start microphone. Check if connected.");
recognizer.deallocate();
}
System.out.println("Say: (turn on | turn off) ( kitchen light | livingroom light | light one | light two )");
}