π€ Microphone for Card Templates
Enable microphone access inside Anki card templates on
Windows, macOS and Linux.
AnkiDroid already supports microphone recording in templates through
"Allow templates to record audio".
Desktop Anki, however, never responds to microphone requests from card templates,
which means recording buttons simply do not work.
This add-on fills exactly that gap.
It allows card templates to access the microphone using the standard browser API:
navigator.mediaDevices.getUserMedia({ audio: true })
No extra template changes required.
If your template already works on AnkiDroid, it can work on desktop Anki too.
β¨ Ideal for Pronunciation Practice
This add-on was originally developed for the German deck
"20.000 hΓ€ufige WΓΆrter", specifically the card types
Audio and HΓΆren.
Typical workflow:
- Press and hold the record button
- Repeat the word or sentence
- Release the button
- The card compares your recording with the original
- Optionally receive AI-based feedback using your own Gemini API key
The add-on is not restricted to this deck and works with any template
that records audio via the standard browser microphone API.
β
Features
- π€ Enables microphone access for card templates on desktop Anki
- π Audio-only permissions (camera access is always denied)
- π΄ Visible REC indicator while recording
- π§© Provides
window.ankiMicrophone === true for template detection
- π Works in:
- Reviewer
- Card Previewer
- Card Template Editor Preview
- β‘ Lightweight and focused on a single purpose
π Privacy & Security
This add-on:
- Does not record audio itself
- Does not store recordings
- Does not transmit data anywhere
- Does not access the network
- Does not collect analytics
The add-on merely grants microphone access to the card template.
What happens with the audio depends entirely on the template's JavaScript code.
As always, only use templates you trust.
βοΈ Configuration
Tools β Add-ons β Microphone for Card Templates β Config
Option
Description
enabled
If false, all microphone requests are refused.
show_indicator
If false, the recording badge is hidden.
After changing settings, restart Anki.
Qt WebEngine remembers permission decisions until Anki is closed.
π Requirements
- Anki 24.04 or newer
- Tested with Anki 26.09.3 on Linux
- Works with both modern and legacy Qt permission APIs
- Operating-system microphone permission must be granted to Anki
Examples:
- Windows: Settings β Privacy & Security β Microphone
- macOS: System Settings β Privacy & Security β Microphone
π¨βπ» For Template Authors
Without this add-on, desktop Anki leaves microphone requests pending forever.
You can detect support before displaying recording controls:
var desktop = typeof pycmd === 'function';
if (!desktop || window.ankiMicrophone === true) {
// show record