コード例 #1
0
        public MainWindowViewModel(MainWindow mainWin)
        {
            this.mainWin = mainWin;            
            _speech = "";
            _confThreshold = 0.86;
            _listenButtonText = "Start Listening";
            _addButtonText = "Add Songs";

            songRecognizedEvent += HandleSongRecognized;

            songRepo = new SongRepo();
            speechEngine = new SpeechEngine(songRecognizedEvent);
            player = new SongPlayer();
        }
コード例 #2
0
        public MainWindowViewModel(MainWindow mainWin)
        {
            this.mainWin = mainWin;
            _speech = "";
            _confThreshold = 0.86;
            _listenButtonText = "Start Listening";
            _addButtonText = "Add Songs";

            songRecognizedEvent += HandleSongRecognized;
            menuRecognizedEvent += HandleMenuRecognized;
            
            songRepo = new SongRepo();

            speechEngine = new SpeechEngine(songRecognizedEvent, menuRecognizedEvent);

            mainWin.sw.WriteLine("SE init Success");

            speechEngine.Start();

            mainWin.sw.WriteLine("SE start Success");

            player = new SongPlayer();

        }