/// <summary>
        /// HomeViewModel constructor. Assigsn API service clients, creates a <see cref="FrameGrabber{AnalysisResultType}"/> and <see cref="Recording"/> objects
        /// </summary>
        /// <param name="faceServiceClient"><see cref="FaceServiceClient"/> object</param>
        /// <param name="emotionServiceClient"><see cref="EmotionServiceClient"/> object</param>
        /// <param name="speakerIdentification"><see cref="ISpeakerIdentificationServiceClient"/> object</param>
        public HomeViewModel(FaceServiceClient faceServiceClient, ISpeakerIdentificationServiceClient speakerIdentification)
        {
            _faceServiceClient     = faceServiceClient;
            _speakerIdentification = new SpeakerIdentification(speakerIdentification);

            _frameGrabber = new FrameGrabber <CameraResult>();
            _recording    = new Recording();

            Initialize();
        }
        public AdministrationViewModel(FaceServiceClient faceServiceClient, ISpeakerIdentificationServiceClient speakerIdentification)
        {
            _speakerIdentification = new SpeakerIdentification(speakerIdentification);
            _speakerIdentification.OnSpeakerIdentificationError         += OnSpeakerIdentificationError;
            _speakerIdentification.OnSpeakerIdentificationStatusUpdated += OnSpeakerIdentificationStatusUpdated;

            _faceServiceClient = faceServiceClient;

            Initialize();
        }
예제 #3
0
        /// <summary>
        /// Initialize function to create all API client objects and ViewModels
        /// </summary>
        private void Initialize()
        {
            _faceServiceClient           = new FaceServiceClient("FACE_API_KEY", "ROOT_URI");
            _speakerIdentificationClient = new SpeakerIdentificationServiceClient("API_KEY_HERE");

            AdministrationVm = new AdministrationViewModel(_faceServiceClient, _speakerIdentificationClient);
            HomeVm           = new HomeViewModel(_faceServiceClient, _speakerIdentificationClient);
            LuisVm           = new LuisViewModel();
            BingSearchVm     = new BingSearchViewModel();
        }
        private void Initialize()
        {
            _faceServiceClient           = new FaceServiceClient("API_KEY_HERE");
            _emotionServiceClient        = new EmotionServiceClient("API_KEY_HERE");
            _speakerIdentificationClient = new SpeakerIdentificationServiceClient("API_KEY_HERE");

            AdministrationVm = new AdministrationViewModel(_faceServiceClient, _speakerIdentificationClient);
            HomeVm           = new HomeViewModel(_faceServiceClient, _emotionServiceClient, _speakerIdentificationClient);
            LuisVm           = new LuisViewModel();
            BingSearchVm     = new BingSearchViewModel();

            EntityLinkingVm = new EntityLinkingViewModel();
        }
 public SpeakerIdentification(ISpeakerIdentificationServiceClient speakerIdentificationClient)
 {
     _speakerIdentificationClient = speakerIdentificationClient;
 }