January 5, 2021, 11:02am
On my Linux desktop every audio playback is delayed by about 2-5 seconds. This gets pretty annoying considering it lengthens my reviews by up to 30%.
I do have mpv installed and I saw Anki starting it in the process manager.
Anybody else encountering this or knows a fix to this?
Version 2.1.35 (84dcaa86)
Python 3.9.1 Qt 5.15.2 PyQt 5.15.2
Manjaro 20.2 Nibia / x86_64 Linux 5.10.2-2-MANJARO
KDE 5.77.0 / Plasma 5.20.4 / KWin
Intel Core i7-4790K / GeForce GTX 970 / 16GB RAM
January 6, 2021, 9:38am
Please use mpv in the command line to play a file - do you get the same delay, or does the issue only exist in Anki? If the issue is not limited to Anki and happens with mpv from the command line, perhaps people on your distro’s forums can give you some hints about how to fix the issue.
January 10, 2021, 6:29pm
There doesn’t seem to be any delay at all when playing the same media files via mpv from the command line.
If there’s a delay between two files, maybe run something similar in the Debug Console in Anki.
from aqt.sound import av_player
If there’s a delay, maybe check the audio files with Audacity, maybe there’re a few seconds of silence at the end.
You could also create
Anki2 folder with something similar to
then restart Anki, review a few cards, if you notice a delay, take a look at
mpv.log.txt. It will contain something like
[ 80.451][cplayer] Run command: loadfile
[ 80.497][cplayer] Starting playback
[ 80.548][v][cplayer] starting audio playback
In this case the delay is about 97 ms. But since you couldn’t reproduce the delay by playing the audiofile directly with mpv, it’s likely that the delay will be about the same or less, and
mpv.log.txt probably won’t be very helpful.
Maybe try to temporarily uninstall mpv and install mplayer.
February 12, 2021, 9:56pm
I’m having the same problem since 2.1.35 or even earlier. It seems to be a long running problem. It only happens with on-the-fly tts. Not with generated mp3’s or cached on-the-fly mp3’s.