avs.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:python-avs 作者: lddias 项目源码 文件源码
def recognize_speech(self):
        """
        send recognize speech event and process the response

        :param speech: file-like containing speech for request
        :param mic_stop_event: threading.Event when speech is an infinite stream, to monitor for signal from
                               downchannel stream to end the recognize request.
        """
        if self.speech_profile not in SPEECH_CLOUD_ENDPOINTING_PROFILES:
            if self.expect_speech_timeout_event:
                self.scheduler.cancel(self.expect_speech_timeout_event)
        self._audio_input_device.start_recording()
        self.handle_parts(self.send_event_parse_response(self._generate_recognize_payload(self._audio_input_device)))
        logger.debug("Recognize dialog ID: {}".format(self._current_dialog_request_id))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号