Easier solution nowadays is to switch to sounddevice. Example: https://python-sounddevice.readthedocs.io/en/0.5.1/api/platform-specific-settings.html#sounddevice.WasapiSettings