Iām sure itās a bug, but I havenāt received an answer to the exact solution to this.
The problem I am having is:
Currently I am using the latest version 2.1.49.
I was studying hard through Anki. It was confirmed that the Anki card contains various audio files such as MP3 and TTS and works well.
But the problem occurs after clicking the export button as shown below.
Export ā Anki Collection Package (Check Include Media) ā After pressing the Export button, if you do card learning without exiting Anki, the audio does not work.
Note that Audio includes both MP3 files and TTS.
As a result of my various tests, the solution to this is
Restart the Anki program
Re-import the exported file
When exporting, there is a way to export as an Anki Deck Package rather than as Anki Collection
Package.
As a result of testing in version 2.1.26, it was confirmed that the audio works well even after export ā collection package.
So Iām pretty sure the problem occurred when I upgraded to the latest version.
I want to solve this problem because I personally want to use the latest version.
Iāve asked a question before, but no one answered it properly, so Iām asking again.
I really wish there was someone who could help me to solve this problem.
Itās not clear what is causing the issue, so you have to troubleshoot by following the steps to find the problem. @kelciour provided detailed steps for that.
I couldnāt find this information in your current or previous posts and will assume that you either donāt have any add-on installed or already tried to turn them off to make sure that the problem wasnāt caused by the add-on - https://faqs.ankiweb.net/when-problems-occur.html - and Tools > Check Media reported no missing audio files.
I donāt know, but the next update wonāt help much if the problem isnāt found in the code and fixed. I guess, it needs some further investigation why it happens and understanding whatās going on.
To help understand why the sound wonāt work anymore with mpv, something like this can be done. There will be a lot of words, but itās just about enabling logging for mpv and printing the current working directory before and after export.
Open Anki
Enable logging for mpv (just this time, until Anki or mpv hasnāt been closed).
Open the Debug Console, run this code, then close the Debug Console.
Review a card with the sound, then click on the play button once or twice (just front or back, without moving to the next card). As I understand, the sound will work fine.
Then go back to the decks screen and use the export button.
Review the same card again, then click on the play button once or twice. As I understand, at this moment the sound wonāt work anymore.
Get the current working directory for media files (again).
Open the Debug Console, run this code, then close the Debug Console.
media_dir = os.getcwd()
print(media_dir)
The output might be the same as before or maybe it will be different this time.
Run Tools > Check Media. It should report no missing files.
Close Anki.
Look at mpv.log.txt on your Desktop or upload it somewhere, e.g. https://gofile.io, maybe itāll contain some information why mpv canāt play the same sound file the second time.
Thatās it
Alternatively, instead of creating mpv.log.txt, you can view mpv output in the real time.
Just in case, to prevent accidental freezing the console window and pressing Enter to unfreeze it, open the Properties and uncheck āQuick Edit Modeā.
Close Anki if itās open, then start mpv in a similar way as Anki does by copy-pasting this command into the Command Prompt and pressing Enter.
If you see [ipc] Couldn't create first pipe instance, you must have some mpv process floating around. Close it with the Task Manager or Process Explorer and rerun the command again to start mpv.
I just read the answer you wrote really hard. Thank you very much.
However, I have no knowledge of coding, so it is too difficult for me to understand what you are explaining.
Simply how can I solve this problem?
Will there be a release with this issue fixed in the next update?
I am very interested and curious about these two things.
It would be really appreciated if the developer could fix this bug.
If you follow carefully the steps, you should encounter no issue. If you did (you fail to get through a step), please say so, and that step will be explained more in details. The problem cannot be solved if it is not identified, and this debugging steps are necessary to find out what the problem is.
So, to answer your questions, to solve this problem you need to repeat the steps and post the result, so that we can think of a solution, and no it is probably not going to be fixed in the next update if the problem has not been found yet (itās hard to patch a problem you donāt know anything about, right?).
When asked to enter text into the ādebug consoleā, please start Anki, and in the main window, press Ctrl+Shift+; (the control key, shift key, and semi-colon key at the same time).
In the window that has popped up, please paste the text you were asked to paste in the top section. When youāve done so, please press Ctrl+Return, and some text should appear in the bottom section. If youāve been asked to paste the resulting output, please copy it from the bottom area, and paste it back to the support person.
from anki.buildinfo import buildhash, version
anki_version = f"{version} ({buildhash})"
media_dir = os.getcwd()
print(anki_version)
print(media_dir)
Review a card with sound (expected result: it works).
Use the export button.
Review a card with sound (expected result in your case: it no longer works).
Rerun the same code in the debug console. Let me know the output.
from anki.buildinfo import buildhash, version
anki_version = f"{version} ({buildhash})"
media_dir = os.getcwd()
print(anki_version)
print(media_dir)
Hereās a quick screencast how to do these steps.