Airpods audio is delayed

Has anyone noticed airpods audio delay on desktop? The audio as well as the transition between cards containing audio is delayed when I use airpods. I’m using an m1 mac.

I don’t have AirPods or Mac, but…

  • Maybe the issue will disappear while playing a 1 hour long silence audio file at the same time in the background (to keep the audio device active)

    https://github.com/anars/blank-audio

  • It doesn’t seem to be the same issue, but it resulted to some changes to the audio code in mpv-0.36 for Mac and maybe the behavior will be different after updating mpv to the latest version (Anki uses mpv under-the-hood to play sound), but I’m not sure if it’s possible to update mpv on Mac.

    Lags when skipping forward/backward while output is AirPods · Issue #10270 · mpv-player/mpv · GitHub

    Anki ships with mpv-0.33.1, I think, because of supporting old macOS versions.

    In the past it was possible to use Finder > Application > Anki and view its contents (Ctrl or Right Click > Show Package Contents), but this option was removed from Mac (according to Google) and I don’t know if you can modify the folder using the Terminal app and I don’t know if Mac will allow to run the modified Anki app after replacing the mpv binary with the latest mpv version.

    But it might look something like this:

    • Close Anki

    • Open the Terminal app and try to remove mpv by running this command.
      rm /Applications/Anki.app/Contents/Resources/mpv

    • If it was successful (no error message), try to open Anki. There will be no sound, but everything else should work normally.

    • If Mac doesn’t prevent you from opening Anki, try installing the latest mpv version and updating the Path environment variable (so Anki could find mpv).

    • It can be done via Homebrew

  • Or maybe AirPods will behave differently while using HTML5 Audio to play mp3 audio files.

    Maybe try the following deck. It includes two subdecks with the same 5 cards from https://ankiweb.net/shared/info/974811307 (Classical Music Themes). The first one uses [sound:audio.mp3] and the second one uses <audio src="audio.mp3" controls>. Normally, mpv should respond a bit faster and HTML5 Audio will wait until the page is rendered and will be delayed a bit (maybe by 0.1 second).

    https://drive.google.com/file/d/18qwAGZcwtyXLn4SKGYod8k3ZzQlikBx_

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.