more debug

This commit is contained in:
talksik
2023-04-27 14:43:13 -07:00
parent 2399b54e81
commit 2df7dec44d
+4 -2
View File
@@ -62,7 +62,7 @@ class Audio:
def _playFrames(self): def _playFrames(self):
print("* playing recorded audio") print("* playing recorded audio")
print(self.frames) print(len(self.frames))
playbackStream = self.pyaudio.open( playbackStream = self.pyaudio.open(
format=self.pyaudio.get_format_from_width(RESPEAKER_WIDTH), format=self.pyaudio.get_format_from_width(RESPEAKER_WIDTH),
@@ -73,11 +73,13 @@ class Audio:
# loop through self.frames and play audio # loop through self.frames and play audio
for frame in self.frames: for frame in self.frames:
print("playing a frame")
playbackStream.write(frame) playbackStream.write(frame)
print("* done playing recorded audio")
# cleanup stuff # cleanup stuff
playbackStream.stop_stream() playbackStream.stop_stream()
playbackStream.close()
def terminate(self): def terminate(self):
self.pyaudio.terminate() self.pyaudio.terminate()