Sound not playing on reveal card & replay audio in 25.02

I updated to v25.02 from v24.11. Sound no longer plays when flipping a card or when selecting ‘replay audio’.

MPV works fine, as I hear the audio file when I drag an mp3 file into the sound field in the Edit Card window. The sound filenames have not changed, nor have the audio files been moved. Anki v25.02 simply refuses to play sound files when it should. I have tried disabling addons and double-checking all relevant sound options in Preferences and Deck Options.

Downgrading to v24.11 fixes this problem.

2 Likes

Please go to Help > About > Copy Debug Info and paste the text here.

If you go to the debug console and run this, what output do you get?

from aqt.sound import mpvManager

print(mpvManager.mpv_version)
3 Likes

Hi, I’ve got the same problem, .wav files are okay but .mp3 files could be not played

1 Like

Same problem = Same response.
Please do the things that abdo asked above.

2 Likes

Anki 24.11 (87ccd24e) (ao)
Python 3.9.18 Qt 6.6.2 PyQt 6.6.1
Platform: Windows-10-10.0.26100

===Add-ons (active)===
(add-on provided name [Add-on folder, installed at, version, is config changed])
Add Table [‘1237621971’, 2023-06-18T18:37, ‘None’, mod]
Anki IPA [‘799647424’, 2023-11-07T05:24, ‘None’, mod]
AwesomeTTS - Add speech to your flashcards [‘1436550454’, 2025-02-15T15:23, ‘None’, ‘’]
Browser TableEditor side-by-side horizontal split [‘831846358’, 2022-01-26T05:11, ‘None’, ‘’]
Duplicate and Reorder [‘1114271285’, 2023-08-28T03:55, ‘None’, ‘’]
Google Translate [‘1536291224’, 2025-02-13T04:57, ‘None’, mod]
Mini Format Pack [‘295889520’, 2023-11-03T01:00, ‘None’, ‘’]
Review Heatmap [‘1771074083’, 2022-06-30T08:43, ‘None’, ‘’]
See Previous Card Ratings in Reviewer [‘1906641654’, 2025-01-21T11:13, ‘None’, ‘’]
editor paste raw unfiltered full html [‘1765712663’, 2023-11-05T19:54, ‘None’, ‘’]
extended editor for field for tables searchreplace [‘805891399’, 2023-07-31T21:12, ‘None’, mod]
paste plainunformatted text [‘107041104’, 2023-11-05T04:23, ‘None’, ‘’]

===IDs of active AnkiWeb add-ons===
107041104 1114271285 1237621971 1436550454 1536291224 1765712663 1771074083 1906641654 295889520 799647424 805891399 831846358

===Add-ons (inactive)===
(add-on provided name [Add-on folder, installed at, version, is config changed])

Hi, I have zero degree about technique, could you please give me more instruction about run debug console? I paste these sentences into the debug console but dont see the run button

I don’t know shat problem you’re having, but I don’t think it’s the same as OP, since theirs worked fine on 24.11 and the issue didn’t start until 25.02.

Why don’t you give us a fuller explanation of what you’re seeing –

  • What are you expecting to happen?
  • What is happening instead?
  • When did this start?
  • Is it happening only in particular decks or particular note types (and other decks/note types play mp3s fine)?
  • Is this happening on cards where you know the audio used to work, or on New cards that you’re just starting to study?
  • Are your cards showing a Play button?
  • Are your devices fully synced, including all media?

[I’ll probably break you off into your own thread, but not until we know what the problem is.]

1 Like
Anki 25.02 (038d85b1)  
Python 3.9.18 Qt 6.6.2 PyQt 6.6.1
Platform: Windows-10-10.0.19045
>>> from aqt.sound import mpvManager
...
... print(mpvManager.mpv_version)
(0, 34, 0)
2 Likes

@hogwild Run this code in the debug console then try playing some sounds:

from aqt.sound import MpvManager

MpvManager.default_argv += ["--reset-on-next-file=pause"]

Nothing changed. Still no sound on card reveal or “replay audio”.

Any idea @kelciour? My guess it’s related to Fix mpv loadfile syntax change 2 by kelciour · Pull Request #3711 · ankitects/anki · GitHub

1 Like

@abdo thank you for the ping!

@hogwild

First, try to create a log file.

  1. Open the debug console and run the following code

https://docs.ankiweb.net/misc.html#debug-console

import os
from aqt.sound import mpvManager
logfile = os.path.expanduser("~/Desktop/f.txt")
mpvManager.set_property("log-file", logfile)
print(mpvManager.get_property("log-file"))
  1. Review a card (or side) with problematic sound and wait a few seconds

  2. Then click on the replay audio button to replay the audio for the second time and wait a few more seconds.

  3. Finally, take a look at the last few lines in the log file that was created at “~/Desktop/f.txt”.

The lines will look something like this and the name of the ‘audio.mp3’ file should appear twice and match the one that was supposed to play.

[3269.419][d][cplayer] Run command: loadfile, flags=64, args=[url="C:\\Users\\...\\AppData\\Roaming\\Anki2\\User 1\\collection.media\\audio.mp3", flags="replace", options=""]
...
[3269.463][v][cplayer] starting audio playback
...
[3279.762][v][cplayer] finished playback, success (reason 0)

MPV works fine, as I hear the audio file when I drag an mp3 file into the sound field in the Edit Card window.

If you don’t see any ‘loadfile’ commands, maybe something wrong with the back template. Maybe the field with the backside audio wasn’t added to the back template.

Try to reproduce the issue by creating a new deck and add a new note using the Basic note type, add some audio file to the Front field and some other audio file to the Back field, and try to review it.

Also, run Tools > Check Media just to be sure that there are no missing files in the collection.media folder.


Actually, I just remembered, there were some changes to the way how HTML comments are being treated and I suggest to check the back template for the <!-- string first.

Here’s a relevant issue.

3 Likes

Success. The HTML thing was the culprit.
In Edit --> Cards... --> Back Template, Replacing
<!-- {{Audio}}{{SentenceAudio}} -->
With
<div class=sound>{{Audio}}{{SentenceAudio}}</div>
Fixes the playback issues.