AnkiMobile 25.02.1 audio not playing

  • iPhone 14 Pro Max
  • iOS 18.3
  • AnkiMobile to 25.02.1

After updating (from I think 24.11) to 25.02.1, audio does not seem play for flash cards. Neither autoplay nor selecting the replay audio action results in sound being played.

Audio does still work on my phone in general. I tried restarting and the issue persisted.

Sound also doesn’t seem to be working for me in the desktop version 25.02 (038d85b1)⁩ on Windows 11 Pro 10.0.26100. I checked the media folder and the media is still present and I can play it back in an external audio program.

Reverting to 24.11 on desktop has audio working and confirms that this is a regression with the 25.02, I will roll back my phone as well. I am busy and will be unable to look for the cause of this until later tomorrow.

Reverting to 24.11 on my phone also fixed the issue there. Perhaps this release should be yanked on iOS until a bugfix is found given the level of difficulty of reverting the version there.

  1. Can you give us more information about what audio files aren’t working on 25.02? There aren’t any documented changes to supported media types – Release 25.02 · ankitects/anki · GitHub . If you can give me the filename of a file that fails in 25.02, I can take a look at it.

  2. What about your notes and templates? Are these files stored in standard [sound:...] tags, or are you using custom scripts with them?

  3. What is happening instead when you click play? Any apparent reaction in the app?

  4. Have you tried any of these notes on AnkiWeb to see if they play?

  1. All the audio files I tested are mp3 probably around 3 - 7 KB uncompressed. Check out the media è‹č果_google_zh-CN.mp3 for example. This is used in note with id 1624587685619 card with id 1624587685619 in my deck called c. I wonder if some encoding thing changed and now the è‹č果 there is getting encoded differently than it was before and so a file lookup is failing. Although the check media tool doesn’t show any issues. I will be able to run this in a debugger tomorrow and take a look.
  2. The audio is stored in the standard format, the above note for example it is referenced as [sound:è‹č果_google_zh-CN.mp3].
  3. There is seemingly no reaction when I try to play the audio from within Anki, no errors or anything. No messages on terminal either.
  4. I have tried them on AnkiWeb and no luck there either.

Dug around a little bit and traced it back to

Add support for html comments to template syntax (#3662) · ankitects/anki@ef94bf1

The Chinese support addon places the sound tag in a comment in the default card type, see:

<!-- {{Sound}}-->

This is Hyrum’s Law at its finest and feels a little tricky. The addon arguably shouldn’t be expecting tags in comments to be templatized and parsed, instead it should hide the sound field in an element with display: none
 but the damage is already done.

I will open a PR updating the addon but from my work with it in the past, there might be some difficulty getting it merged due to inactivity around supporing it. There might be a large horde of Chinese learners who appear in the forums complaining their audio suddenly stopped working.

3 Likes

Hi @kieran, thanks for debugging and finding the issue!

I saw your PR on GitHub. Until this is submitted, do you have any instructions on how to manually fix the issue until your PR is approved?

I imagine users of the extension could manually patch the fix into the template locally on desktop and then sync all their cards. Or would that require us to manually update each existing card?

Hi @emmetm, happy to provide instructions. Anki is architected in a pretty clever way which nicely separates the contents of the cards from the layout of the cards, this means it is easy to make a change and doesn’t require manually updating each card or anything.

How to fix

  1. Go to Tools > Manage Note Types

  2. Select the Chinese card type in the Note Types popup. This will either be Chinese (Basic) or Chinese (Advanced) or both. I will show how to do it for the Basic note type here but it is the same for Advanced.

  3. Select Cards

  4. Select the Back Template radio button

  5. Replace

<!-- {{Sound}}-->

with

<div class="chinese-support-sound">{{Sound}}</div>


  1. Select the Styling radio button

  2. Add a new line after the line starting with .answer and paste this on it:

.chinese-support-sound { display: none; }

  1. Click Save in the bottom right

Thats all there is to it. After you sync, things will work on your phone again.

3 Likes

Thanks Kieran! This worked perfectly for me, thanks also for making the instructions so detailed :slight_smile:

One thing I noticed today - only half the cards seem to play sound during a session. It seems pretty random to me - a mix of cards before/after I updated the template, older/newer cards, etc. It’s also always the same cards between app restarts and reviews.

Any clue what could be the cause?

I’ve shared a copy of my deck if it helps. Thanks!

https://ankiweb.net/shared/info/1392077804

Which cards?

Does your note type make multiple cards that have audio?

1 Like

Nice catch - indeed there are two cards generated from a note, I had updated the first but not the second!

For others, make sure you apply the back card change/styling to both card types, by changing the card template under Tools > Manage Note Types > Cards like so:

1 Like

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