public AVTranscriptRecorder(TranscriptRecorderSession transcriptRecorder,
            EventHandler<ConversationChangedEventArgs> audioVideoCallConversationChangedEventHandler = null,
            EventHandler<CallStateChangedEventArgs> audioVideoCallStateChangedEventHandler = null,
            EventHandler<AudioVideoFlowConfigurationRequestedEventArgs> audioVideoFlowConfigurationRequestedEventHandler = null,
            EventHandler<MediaFlowStateChangedEventArgs> audioVideoFlowStateChangedEventHandler = null)
        {
            if (transcriptRecorder == null)
            {
                throw new ArgumentNullException("transcriptRecorder");
            }

            _transcriptRecorder = transcriptRecorder;
            _speechRecognizer = new SpeechRecognizer(transcriptRecorder);

            _audioVideoCallConversationChangedEventHandler = audioVideoCallConversationChangedEventHandler;
            _audioVideoCallStateChangedEventHandler = audioVideoCallStateChangedEventHandler;
            _audioVideoFlowConfigurationRequestedEventHandler = audioVideoFlowConfigurationRequestedEventHandler;
            _audioVideoFlowStateChangedEventHandler = audioVideoFlowStateChangedEventHandler;
        }
예제 #2
0
        public AVTranscriptRecorder(TranscriptRecorderSession transcriptRecorder,
                                    EventHandler <ConversationChangedEventArgs> audioVideoCallConversationChangedEventHandler = null,
                                    EventHandler <CallStateChangedEventArgs> audioVideoCallStateChangedEventHandler           = null,
                                    EventHandler <AudioVideoFlowConfigurationRequestedEventArgs> audioVideoFlowConfigurationRequestedEventHandler = null,
                                    EventHandler <MediaFlowStateChangedEventArgs> audioVideoFlowStateChangedEventHandler = null)
        {
            if (transcriptRecorder == null)
            {
                throw new ArgumentNullException("transcriptRecorder");
            }

            _transcriptRecorder = transcriptRecorder;
            _speechRecognizer   = new SpeechRecognizer(transcriptRecorder);

            _audioVideoCallConversationChangedEventHandler    = audioVideoCallConversationChangedEventHandler;
            _audioVideoCallStateChangedEventHandler           = audioVideoCallStateChangedEventHandler;
            _audioVideoFlowConfigurationRequestedEventHandler = audioVideoFlowConfigurationRequestedEventHandler;
            _audioVideoFlowStateChangedEventHandler           = audioVideoFlowStateChangedEventHandler;
        }
예제 #3
0
        public override void Shutdown()
        {
            if (_state == TranscriptRecorderState.Terminated)
            {
                return;
            }
            _state = TranscriptRecorderState.Terminated;

            this.TerminateCall();

            if (_speechRecognizer != null)
            {
                _speechRecognizer.Shutdown();
                _speechRecognizer = null;
            }

            _transcriptRecorder.OnMediaTranscriptRecorderTerminated(this);
            _transcriptRecorder = null;
        }
        public override void Shutdown()
        {
            if (_state == TranscriptRecorderState.Terminated)
            {
                return;
            }
            _state = TranscriptRecorderState.Terminated;

            this.TerminateCall();

            if (_speechRecognizer != null)
            {
                _speechRecognizer.Shutdown();
                _speechRecognizer = null;
            }

            _transcriptRecorder.OnMediaTranscriptRecorderTerminated(this);
            _transcriptRecorder = null;
        }