audio.py 文件源码

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

项目:high-quality-chat 作者: b6938236 项目源码 文件源码
def _callback(self, in_data, frame_count, time_info, status):
        """
        Callback function for continuous_record
        Checks global var recording
           If true, put frames into the queue - another thread will pop from the queue and write to disk
           If false, shut down the recorder (we don't want silence or sudden time shifts in one recording file)
        """
        if self._recording:
            self._frames.put(in_data)
            callback_flag = pyaudio.paContinue
        else:
            callback_flag = pyaudio.paComplete

        return in_data, callback_flag
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号