{"id":4419,"library":"anki-audio","title":"Anki Audio Binaries","description":"Anki-audio is a Python package that bundles and distributes essential audio binaries (mpv and LAME) required by the Anki spaced repetition software for playing and recording audio. This library ensures that Anki has access to the necessary tools for multimedia functionality. The current version is 0.1.0, and releases are tied to Anki's development and binary requirements.","status":"active","version":"0.1.0","language":"en","source_language":"en","source_url":"https://github.com/ankitects/anki-bundle-extras","tags":["anki","audio","mpv","lame","binary","multimedia"],"install":[{"cmd":"pip install anki-audio","lang":"bash","label":"Install `anki-audio`"}],"dependencies":[],"imports":[],"quickstart":{"code":"import shutil\nimport os\n\nprint(\"Checking for Anki audio binaries after installation:\")\n\nmpv_path = shutil.which(\"mpv\")\nlame_path = shutil.which(\"lame\")\n\nif mpv_path:\n    print(f\"mpv executable found at: {mpv_path}\")\nelse:\n    print(\"mpv executable NOT found on PATH. Anki audio playback may fail.\")\n\nif lame_path:\n    print(f\"lame executable found at: {lame_path}\")\nelse:\n    print(\"lame executable NOT found on PATH. Anki audio recording/processing may fail.\")\n\nprint(\"\\nFor Anki to use these, ensure Anki is configured to find them or that they are correctly on your system's PATH.\")\nprint(\"Typically, Anki automatically detects these if they are installed correctly via 'anki-audio'.\")","lang":"python","description":"This quickstart demonstrates how to verify that the `mpv` and `lame` executables, typically provided by `anki-audio`, are accessible on your system's PATH. Anki relies on these binaries for audio playback and recording."},"warnings":[{"fix":"Verify that `mpv` and `lame` are discoverable by checking your system's PATH. On Windows, manually replacing `mpv.exe` in the Anki installation folder with a known working version or checking its log file can help diagnose issues.","message":"Anki may fail to play or record audio if `mpv` or `lame` executables are not found on the system's PATH or if conflicting versions are present. Ensure the environment is correctly configured after installing `anki-audio`.","severity":"gotcha","affected_versions":"All versions of Anki and anki-audio"},{"fix":"Try changing Windows' administrative language settings to 'Beta: Use Unicode UTF-8 for worldwide language support' and rebooting. As a workaround, avoid non-ASCII characters in audio filenames.","message":"On Windows, `mpv.exe` might have issues playing audio files with UTF-8 characters in their filenames, even if other players like VLC handle them correctly. This can lead to silence during playback within Anki.","severity":"gotcha","affected_versions":"Specific Windows environments, particularly with `mpv.exe` versions where this bug is present."},{"fix":"Check Anki's official forums or release notes for specific workarounds related to your Anki version. This might involve adjusting card templates or, as a temporary measure, reverting to an older Anki version.","message":"Major Anki updates can sometimes disrupt audio playback. For instance, Anki 25.02 introduced changes (e.g., DOMPurify sanitization) that broke HTML tags related to audio embedding in some card templates, or altered MPV integration behavior.","severity":"breaking","affected_versions":"Anki versions 25.02 and newer (potentially affecting older `anki-audio` setups)."},{"fix":"Troubleshoot by updating audio drivers, disconnecting Bluetooth devices, checking Anki's debug console for `mpv` logs, or experimenting with different `mpv` versions. Consider temporary workarounds like playing background music or using different video output drivers in Anki's settings.","message":"Users frequently report audio playback issues in Anki, such as stuttering, cutting off, or complete silence. These can be caused by various factors including outdated audio drivers, Bluetooth device interference, specific `mpv` versions, or system performance bottlenecks.","severity":"gotcha","affected_versions":"All versions of Anki and anki-audio, dependent on system configuration."}],"env_vars":null,"last_verified":"2026-04-12T00:00:00.000Z","next_check":"2026-07-11T00:00:00.000Z"}