Anki add-on: Fix Windows Bluetooth Audio Lag (SoundKeeper)

On Windows, some bluetooth headphones go to sleep when no audio is playing, causing the start of the audio on your cards to be cut off. This add-on fixes that by using SoundKeeper to play a stream of zeroes that keeps your headphones enabled without affecting the audio. Note : I have renamed the binary to SoundKeeperZero.exe because this is the most minimal way to achieve the desired effect, but the documentation does note that this may not work on all hardware. You can rename the .exe and update __init__.py if this default doesn't work for you, but it works fine for me with my Sony WH1000-XM4 and Windows 11. You can also just download SoundKeeper.exe and run it directly without this add-on. I created this add-on so that it only runs when Anki is running, instead of keeping my headphones permanently engaged.

GitHub repository: vrubleg/soundkeeper
Repository description: Prevents SPDIF/HDMI/Bluetooth digital audio playback devices from sleeping.
Languages: C++, C#, Batchfile
Topics: audio, wasapi, windows