Ejemplo n.º 1
0
        public Speech(string subscriptionKey)
        {
            _subscriptionKey = subscriptionKey;
            _activeSubtitle  = new SubtitleSession();
            Subtitles        = new List <SubtitleSession>()
            {
                _activeSubtitle
            };

            _micClient = SpeechRecognitionServiceFactory.CreateMicrophoneClient(
                SpeechRecognitionMode.ShortPhrase,
                DefaultLocale,
                _subscriptionKey);
            _micClient.OnPartialResponseReceived += this.OnPartialResponseReceivedHandler;
            _micClient.OnResponseReceived        += this.OnMicShortPhraseResponseReceivedHandler;
        }
Ejemplo n.º 2
0
 private void CompleteSession(string text)
 {
     ContinueSession(text);
     _activeSubtitle = new SubtitleSession();
     Subtitles.Add(_activeSubtitle);
 }