-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make pyaudio optional #82
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I generally approve the move. I added 2 minor comments in the code.
As Jiajun has a deeper look into this topic, he should approve and merge.
@@ -108,7 +107,7 @@ def _recorder_callback(self, in_data, frame_count, time_info, flag): | |||
self.record_buffer.append(data_float) | |||
# E = 10 * np.log10(np.mean(data_float ** 2)) # energy in dB | |||
# os.write(1, f"\r{E} | {self.block_cnt}".encode()) | |||
return None, pyaudio.paContinue | |||
return self.backend.process_buffer(None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, maybe add a comment that process_buffer
is called both for input and output streams
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice bit of change. Look sane to me apart from a minor issue. Looking forward to trying this out
The goal of this PR is to make the pyaudio dependency optional (as extra pyaudio).