Esempio n. 1
0
        public MainScreen()
        {
            InitializeComponent();

            // Setup Api Stuff
            LoggingApiProvider      loggingApiProvider      = new LoggingApiProvider();
            TextToSpeechApiProvider textToSpeechApiProvider = new TextToSpeechApiProvider();

            // Setup Api Stuff that needs Text to speech support
            ProcessApiProvider    processApiProvider = new ProcessApiProvider(textToSpeechApiProvider);
            RecognizerApiProvider p_Brain            = new RecognizerApiProvider(textToSpeechApiProvider);

            // Setup Language Provider
            m_Brain = p_Brain; // HAHAHAHA science.....
            SetupLanguageProvider();

            // Setup the Api Listing
            IDictionary<string, ApiProvider> apiListing = new ApiDictionary<string, ApiProvider>();
            apiListing.Add("TextToSpeechApi", textToSpeechApiProvider);
            apiListing.Add("ProcessApi", processApiProvider);
            apiListing.Add("LoggingApi", loggingApiProvider);
            apiListing.Add("LoreiApi", m_Brain);

            // Setup Scripting Languages
            m_Brain.LoadScriptProcessor(new LuaScriptProcessor(apiListing));
            m_Brain.LoadScriptProcessor(new IronPythonScriptProcessor(apiListing));
        }
Esempio n. 2
0
        /**
         * API Provider for the Speech recognizer. Includes Grammar creation
         *
         * @param p_textToSpeechApi Allows Speech
         */
        public RecognizerApiProvider(TextToSpeechApiProvider p_textToSpeechApi)
        {
            m_textToSpeechApi = p_textToSpeechApi;

            log4net.Config.XmlConfigurator.Configure();
            log = LogManager.GetLogger(typeof(RecognizerApiProvider));

            // Setup Engine
            SetupSpeechRecognitionEngine();
        }
Esempio n. 3
0
 /**
  * Basic constructor which creates an object to allow scripts access to Software Processes.
  *
  * @param p_textToSpeechApi Instance of TextToSpeechApiProvider
  */
 public ProcessApiProvider(TextToSpeechApiProvider p_textToSpeechApi)
 {
     m_textToSpeechApi = p_textToSpeechApi;
 }