Package edu.cmu.sphinx.frontend.util

Examples of edu.cmu.sphinx.frontend.util.Microphone$RecordingThread


    final Recognizer recognizer = (Recognizer) cm.lookup("recognizer");
    recognizer.allocate();

    // start the microphone or exit if the programm if this is not possible
    Microphone microphone = (Microphone) cm.lookup("microphone");
    if (!microphone.startRecording()) {
      System.out.println("Cannot start microphone.");
      recognizer.deallocate();
      System.exit(1);
    }
View Full Code Here


            recognizer.allocate();
        } 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 )");
    }
View Full Code Here

            }

            ConfigurationManager cm = new ConfigurationManager(url);

            Recognizer recognizer = (Recognizer) cm.lookup("recognizer");
            Microphone microphone = (Microphone) cm.lookup("microphone");

   
      /* allocate the resource necessary for the recognizer */
            recognizer.allocate();
   
      /* the microphone will keep recording until the program exits */
            if (microphone.startRecording()) {

                System.out.println
                        ("Say any digit(s): e.g. \"two oh oh four\", " +
                                "\"three six five\".");

View Full Code Here

TOP

Related Classes of edu.cmu.sphinx.frontend.util.Microphone$RecordingThread

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.