Anki plays short audio clips, and on macOS that does not sit well with AirPods. The opening of a clip goes missing, playback breaks up partway through, and on a long session the connection can drop entirely. Short clips make it worse, and so does having something else playing at the same time.
The add-on holds a silent stream open so the connection never goes idle. I wrote it because nothing in Anki or in macOS fixed the problem.
How it works
While you review, an inaudible stream plays through your headphones, so the audio connection is never asked to start from cold. Bluetooth appears to suspend the stream between clips, and waking it repeatedly seems to be what unsettles the connection, though that part is inference rather than something I have confirmed.
The stream is not true silence. It carries dither, meaning random noise at roughly a millionth of full volume, because some Bluetooth stacks treat an all-zero stream as no stream at all and go idle regardless.
Requirements
macOS and Anki 2.1.45 or newer. On Windows and Linux the add-on loads and does nothing.
Install mpv with brew install mpv. Without it the add-on falls back on the system afplay, which cannot loop a file and so restarts it every ten minutes.
Settings
Tools β AirPods audio fix β Settingsβ¦
You decide whether it runs at all, and whether it runs only around audio or for as long as Anki is open. Running it continuously is more reliable but prevents your headphones from idling, which shortens their battery life noticeably.
Tools β AirPods audio fix β Test it plays a rapid burst of beeps. They should sound even. Choppy or missing beeps mean the connection is still dropping.
What it will not fix
A connection dropping for some other reason, such as a congested 2.4 GHz band or headphones low on charge.
It also runs a small background process, either mpv or afplay, for as long as Anki is open. That process stops when Anki quits and is cleaned up on the next launch if Anki crashes.
Support
Ratings on AnkiWeb are close to the only way anyone discovers an add-on, so leaving one is the most useful thing you can do.

Report a bug