-
Notifications
You must be signed in to change notification settings - Fork 2
audio delay #58
Comments
It might happen if you use on-the-fly TTS and the AwesomeTTS couldn't find the audio file in the cache folder. But once the audio was generated, it will be stored in the cache folder and the next time, if you review the same card again, there should be no delay. By default it's set to last for 365 days. At the moment the cache folder is stored at Otherwise, the issue was caused probably by another add-on or mpv. Maybe try to start Anki and hold down the Shift key to disable all add-ons, then review a few cards to see if the delay is still present or not. Maybe import this deck - https://ankiweb.net/shared/info/427804922. If you review it, there should be no delay. If the delay is still present, it probably means that mpv, that Anki uses to play all sound files, is a culprit. In this case, try installing the latest Anki version (maybe temporarily) to see if the issue is still present. If it doesn't help, open Anki, use the following code in the debug console, and review a few cards. https://docs.ankiweb.net/misc.html#debug-console
Maybe the log file will provide some useful information |
Hey @kelciour , thanks for quick response. The issue doesn't seem to be due to problems with cache:
I tried the classical music set and there is no delay there so the problem seems to not lie with mpv either. Lastly, I started anki and held down the shift key to deactivate all plugins but the delay persisted. I also tried starting Anki in debug mode and got the following output:
And after closing anki there was some additional output:
|
Maybe generate a log file for mpv to see how much time it takes to start playing the audio file. Use the following code in the debug console to create a log file for mpv, then review a card, then press R or click on a sound icon to repeat the audio, I assume there will be a delay, and look at the log file. https://docs.ankiweb.net/misc.html#debug-console
The last lines will contain something like
In this case, it took about 0.05 seconds for a playback to start and 1.31 seconds to finish. In your case, maybe mpv doesn't like the audio file for some reason and it'll be 1-2 seconds, but maybe some log lines in between will give a clue where mpv is being slow. If it's good, maybe locate the audio file in the collection.media folder and open it with Audacity, just to check that there's no silince in the beginning. If you use Bluetooth headphones, maybe review a card without them, with your wired headphones or speakers. |
I recently switched from a 2012 macbook to the new M1 and suddenly it takes at least 2 seconds (sometimes even more) to start reading the card out loud. My anki version is 2.1.35 on both machines and they are synched as well. Does anybody know what could be causing this?
The text was updated successfully, but these errors were encountered: