s0d3s / PyAudioWPatch

🐍 PyAudio | PortAudio fork with WASAPI loopback support 🔊 Record audio from speakers on Windows
Other
138 stars 8 forks source link

Just a quick question about '_spinner_helper' in example.. #1

Closed hwcho11 closed 2 years ago

hwcho11 commented 2 years ago

First of all, Thanks to your work I finally can escape from old 3.8. I really appreciate it.

what package should I install for running your example that import _spinner_helper without modifying the codes?

s0d3s commented 2 years ago

Hello🖐 This is not quite a full-fledged module, but rather an auxiliary class that I took out in a separate file. It is in the folder along with the examples.

To run the code from the examples, the file must be in scope. So put this file on the same level as the executable code.

But in fact, you can remove all the code that is related to _spinner_helper. That is:

And everything will work. This class is only responsible for showing the spinner in the console.

No other packages need to be installed (except PyAudioWPatch of course😉)

P.S. I added support for the context manager to PyAudio, and therefore wrote examples using it. But this fork is fully compatible with the original. That is: all code that works for PyAudio will also work for PyAudioWPatch(but vice versa - not always).