Beispiel #1
0
        private void commandProcessing()
        {
            var    stream  = new MemoryStream(File.ReadAllBytes("01.wav"));
            string result  = SpeechRecognizer.WavStreamToGoogle(stream);
            string command = JsonWorker.Convert(result);
            Engine eng     = new Engine();

            eng.commandsHandler(command);
        }
        public void commandProcessing()
        {
            var      stream              = new MemoryStream(File.ReadAllBytes("01.wav"));
            string   result              = SpeechRecognizer.WavStreamToGoogle(stream);
            string   command             = JsonWorker.Convert(result);
            DateTime dateAndTimeOfRemind = dateAndTime.Value.Date;
            string   timeInStr           = timeList.Text.Substring(0, 2);
            int      timeInInt           = Int32.Parse(timeInStr);
            TimeSpan time = new TimeSpan(timeInInt, 0, 0);

            dateAndTimeOfRemind += time;
            Remind remind = new Remind(remindList.remindList.Count, dateAndTimeOfRemind, command);

            setData(remind);
            AgreeForm saveForm = new AgreeForm("Сохранить напоминание?\nНажмите Enter для сохранения.\nНажмите пробел для отмены.", remind, false);

            saveForm.ShowDialog();
            this.Close();
        }