{"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":"python","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","problems":[{"fix":"Install mpv or mplayer on your system. For example, on Ubuntu, run: sudo add-apt-repository universe; sudo apt update; sudo apt install mplayer mplayer-gui.","cause":"Anki requires mpv or mplayer to play audio and video content, and neither is installed or recognized.","error":"Sound and video on cards will not function until mpv or mplayer is installed."},{"fix":"Ensure 'lame' is installed and accessible. On macOS, you can install it using Homebrew: brew install lame.","cause":"Anki relies on the 'lame' encoder for recording audio, and it is either not installed or not accessible.","error":"Couldn't record audio. Have you installed 'lame'?"},{"fix":"Ensure no other applications are using the microphone, set the microphone as the default recording device, and restart your computer.","cause":"Anki encounters an unexpected error when attempting to access the audio recording device, possibly due to microphone access issues or conflicts with other applications.","error":"Exception in thread Thread-3: Traceback (most recent call last): File \"threading.py\", line 551, in __bootstrap_inner File \"anki\\sound.py\", line 255, in run File \"thirdparty\\pyaudio.py\", line 705, in open File \"thirdparty\\pyaudio.py\", line 387, in __init__ OSError: [Errno -9999] Unanticipated host error"},{"fix":"Restart Anki and ensure that mpv is properly installed and functioning on your system.","cause":"Anki's media player, mpv, is unresponsive or has crashed, leading to timeouts during media playback.","error":"mpv timed out, restarting"},{"fix":"Use the 'Check Database' feature under the Tools menu in Anki to identify and fix potential issues.","cause":"Anki has encountered an unspecified error, potentially due to database corruption or issues with add-ons.","error":"An error occurred. Please use Tools > Check Database to see if that fixes the problem."}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/ankitects/anki-bundle-extras","docs":null,"changelog":null,"pypi":"https://pypi.org/project/anki-audio/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":[],"base_url":null,"auth_type":null,"_links":{"self":"https://checklist.day/api/registry/anki-audio","v1":"https://checklist.day/v1/registry/anki-audio","v1_install":"https://checklist.day/v1/registry/anki-audio/install","v1_imports":"https://checklist.day/v1/registry/anki-audio/imports","v1_compatibility":"https://checklist.day/v1/registry/anki-audio/compatibility","v1_quickstart":"https://checklist.day/v1/registry/anki-audio/quickstart","docs":"https://checklist.day/docs"}}