Switching to Anki’s audio player
The audio player used as default is a html5 player, but it doesn’t work as good/fast as Anki’s “built-in” player.
On Linux and AnkiMobile, the built-in player can’t play audio from urls (the player works if you also download, see below). If you are not using these platforms you can switch to the built-in player by following these instructions:
Select the cards of the deck,
Notes>Find and replace, check “treat as regular expression” and replace
<audio controls="" controlslist="nodownload noplaybackrate"><source src="(.*?)" type="audio/mpeg"></audio>
with
[sound:${1}]
Then replace the entire front card template of Sound to name
with the following:
{{#Sounds}}
<br><br>
<a class="hidden-a" href="#">
<div id="front" class="container">
{{Sounds}}
</div>
</a>
<div class="container btn-container">
<button id="btn" onclick="next_sound()">
<a class="reroll hidden-a" href="#"><b> ↻ </b></a>
</button>
</div>
<p id="console"></p>
<script type="text/javascript">
try {
var elements = document.getElementById('front').getElementsByClassName('aud-w-txt');
var randomIdx = Math.floor(Math.random() * elements.length);
play_sound();
if (elements.length == 1) {
document.getElementById("btn").style.display = "none";
}
function next_sound() {
randomIdx = (randomIdx + 1) % elements.length;
play_sound();
}
function play_sound() {
for (var i = 0; i < elements.length; i++) {
elements[i].style.display = (i == randomIdx ? "flex" : "none");
}
document.getElementById('front').getElementsByClassName('replay-button')[randomIdx].click();
}
// Adds eventlistener on first card only
const element = document.getElementById('qa');
if (element.getAttribute('listener') !== 'true') {
document.addEventListener('keyup', function(event) {
var key = event.key || event.keyCode;
if (key == 'R' || key == 'r') {
play_sound();
} else if (key == 'N' || key == 'n') {
next_sound();
}
});
element.setAttribute('listener', 'true');
}
} catch (error) {
document.getElementById('console').innerHTML = error;
}
</script>
{{/Sounds}}
Finally go to the deck options and enable “Don’t play audio automatically” and you’re done (the audio will still play automatically as JavaScript is used to play a random sound).
Downloading media
The entire deck has media worth of something like 100GB, which is why references to urls are used, but if you want, you can download media after switching to Anki’s audio player as described above (otherwise audio won’t be downloaded).
The problem is just that this method is very slow. We’re talking 100 notes/hour slow, so consider not downloading, but anyways here are some instructions:
Choose what to download
You can as explained in the deck’s description change the image quality, but also, if you don’t want to download 10 audio files for each note you can delete some of them so there are only e.g. 5 audio files per note by replacing (as regular expression)
((?:<div class="aud-w-txt">.*?</div></div>){5}).*
with
${1}
Just replace the 5 with however many you want to keep.
Downloading with Localize Media
To download images and audio get the addon Localize Media, and use it on only the cards you need (it is slow so do a few at a time).
Afterwards select the cards and replace (\[sound:.*?)\.\]
with ${1}]
and it should work.