예제 #1
0
파일: RhinoManager.cs 프로젝트: yyht/rhino
 /// <summary>
 /// Starts audio capture and intent inference
 /// </summary>
 public void Process()
 {
     if (_rhino == null || _voiceProcessor == null)
     {
         throw new ObjectDisposedException("Rhino", "Cannot start RhinoManager - resources have already been released");
     }
     _voiceProcessor.StartRecording(_rhino.SampleRate, _rhino.FrameLength);
 }
예제 #2
0
 /// <summary>
 /// Starts audio capture and wake word detection
 /// </summary>
 public void Start()
 {
     if (_porcupine == null || _voiceProcessor == null)
     {
         throw new ObjectDisposedException("Porcupine", "Cannot start PorcupineManager - resources have already been released");
     }
     _voiceProcessor.StartRecording(_porcupine.SampleRate, _porcupine.FrameLength);
 }
예제 #3
0
        /// <summary>
        /// Starts audio capture and Picovoice processing
        /// </summary>
        public void Start()
        {
            if (_picovoice != null)
            {
                return;
            }

            _picovoice = Picovoice.Create(_keywordPath, _wakeWordCallback,
                                          _contextPath, _inferenceCallback,
                                          _porcupineModelPath, _porcupineSensitivity,
                                          _rhinoModelPath, _rhinoSensitivity);

            _voiceProcessor.OnFrameCaptured += OnFrameCaptured;
            _voiceProcessor.StartRecording(_picovoice.SampleRate, _picovoice.FrameLength);
        }