Looking at the official PyAudio Git repository (i.e., https://people.csail.mit.edu/hubert/git/pyaudio.git), the official fix appears to be in commit a0edea31bb2af47f54d85da0912133ac1ac180f9. The only difference I see compared to the fix I attached here is some additional minor refactoring; otherwise, it is functionally similar.
Looking at the official PyAudio Git repository (i.e., https:/ /people. csail.mit. edu/hubert/ git/pyaudio. git), the official fix appears to be in commit a0edea31bb2af47 f54d85da0912133 ac1ac180f9. The only difference I see compared to the fix I attached here is some additional minor refactoring; otherwise, it is functionally similar.