piano.py 文件源码

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

项目:piano 作者: respeaker 项目源码 文件源码
def __init__(self, pa):
        self.pa = pa
        self.event = threading.Event()
        self.wav = wave.open(os.path.join(PIANO_PATH, 'c1.wav'), 'rb')
        self.stream = self.pa.open(format=pyaudio.paInt16,
                                   channels=self.wav.getnchannels(),
                                   rate=self.wav.getframerate(),
                                   output=True,
                                   # start=False,
                                   # output_device_index=1,
                                   frames_per_buffer=CHUNK_SIZE,
                                   stream_callback=self._callback)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号