Anki add-on: Audio Playback Controls - mod kaiu 2026

Modification of such a simple addon Audio Playback Controls To begin with, I added the ability to set both the normal speed (essentially slow) and the fast speed specified in the settings. Since it was convenient for me to control the arrows, the keys were assigned to them and an additional option was introduced to make a spacebar, there is a 0 next to it, it seemed more convenient to me if the spacebar is already occupied by turning over the card. The need to set a specific "A-B" playback interval is almost standard in media players. However, the following algorithm hasn't found interest among developers of other video and audio players: playing the "A-B" interval several times, then shifting the range, and then playing a new "A-B" interval again several times, and so on until the end of the file. I think this would be ideal for memorization. For now, everything is manual: you can play the "A-B" interval endlessly or set the desired number and then set a new "A-B" interval again. If you play endlessly and notice that you've learned something, you can shift the interval forward and learn the new part of the information. If you've learned the new information as well, you can shift back and try to connect the old with what you've learned. A small jump option has been added. Let's say you just heard a word and need to rewind it, it's easier to rewind 2 seconds (or however many seconds you specify in the settings). You can also jump to the exact position you want. A window will appear where you can specify a percentage, an exact value, or a relative value from the current position. Please note that to make it clear that a file is playing, I had to change the button design. I didn't want to change these buttons; they're familiar and don't take up much space in the text. However, I added the time and percentage (for short files, up to 3 seconds, they're not displayed because they don't make sense). The current file is detected, and the button currently playing is highlighted. It's often important to create a bookmark, a location to return to if something isn't clear from a subsequent explanation. It's easier to do this with a dedicated button and then quickly return to it if something just doesn't stick. This is an alternative to the "A-B" playback of a range and is very useful for YouTube (there's a special extension). The advantage of using a bookmark is that you can constantly change the range depending on the complexity of the information you're studying. And the last thing in the menu: this is exactly the functionality you asked for: infinite repeat. But the problem is that repeat can be for a single file (or a range of A-B repeats), or it can be for the entire file list. So there are two repeats here. The first repeat is the entire list (the outer one, so the button color will change more). Second repeat: This repeats one file from the entire playlist. For example, you want to repeat each file in a row twice (set repeat 1), and the entire playlist just once (set repeat 0). Well, it could be both, so the button would look like this: You can change these styles in the addon folder, there is a css file there. And it seems like a lot has been done, but users also want this option: how to prevent some files from playing in autoplay (when pressing the R button, too)? So, they want it to be so that if a very long file is provided as an additional file, it's not needed for autoplay, but is needed if the user wants to learn something and clicks on it themselves. There are other options where it's not desirable to have everything voiced (at least a long TTS). People have a solution: using JavaScript. It's possible and good, but it requires specialized knowledge and isn't perfect. Perhaps one day we'll see the implemented request to have a setting for each field, determining whether it should be played when the map is displayed. However, there are still complex cases where the map has a different number of audio files, and the order of the files is important—say, the text is followed by text, and some files shouldn't be played, while others should be. So, such files need to be marked somehow, or more precisely, wrapped in a tag. I chose the class name "muteAudio." If you write this in the card design, you could use: {{Front}} <span class="muteAudio">{{Sounds}}</span> Then all sounds in the {{Sounds}} field will not play automatically on this side of the card. The tag name doesn't have to be a standard one. For example, here I've wrapped it with a made-up t1 tag to prevent the Extra field from autoplaying using TTS : <t1 class="muteAudio">{{tts en_US:Extra}}</t1> If you need to mute certain sounds on a specific card, then you need to change it not in the design, but in the field itself. You can do the same thing, the main thing is to have class="muteAudio" On the card itself, if you want to use TTS to voice a large portion of the text just for reference, then you certainly don't need auto-voice. In that case, you'll need to do it a little differently: [anki:tts lang=en_US class=muteAudio] On the card itself, if you want to use TTS to voice a large portion of the text just for reference, then you certainly don't need auto-voice. In that case, you'll need to do it a little differently: [/anki:tts] I wrote class=muteAudio without quotes. The key word here is muteAudio , and you can replace class with something shorter and more convenient for you; it's not that important. Now such long text won't be voiced on this particular card, unless you write it all in the field, of course, and not in the design. Although I admit that the card design may contain explanations that certainly shouldn't be voiced during autoplay, someone wants to hear such information, so a button somewhere could have been included. Since this is an add-on, keep in mind that this functionality won't work in Anki Droid or anywhere else. But the more people want to use custom algorithms, the more likely it is that this Anki algorithm will become the standard, and then Anki Droid will implement it. P.S. Oh, and I forgot to show an example of the window that appears when you click actions. Let's say it's useful to press pause and get information about the file length and whether the range "A-B" is specified. Added since version 1.3, date: 2026-07-30 A menu option has been added to the preview by pressing the "M" key, allowing you to control audio from the preview. The cue position and range A-B are saved for each file. I show the pause in red. Added the ability to extend the A-B range by the length of the last setting in that range. Added the ability to jump to the beginning of a file or to another file (only if the file list is open, not if the user clicked a single file). Added the ability to extend the A-B range by the length of the last setting for that range. Added the ability to jump to the beginning of a file or to another file (only if the file list is open, not if the user clicked a single file). It's possible to jump to the beginning of the A-B range, as well as after it. Please note how hotkeys are set in the addon settings: "go_to_bookmark_shortcut": [ "ctrl+,", "9", "ctrl+б" ], For convenience, I also entered the keystroke 9, and also at the very bottom is shown the combination for the Russian layout, since QT has a problem with assigning hotkeys if your language is not English and you use other keys. HELP AND SUPPORT Please do not use reviews for bug reports or support requests. And be sure to like, as your support is always needed. Thank you. I don't get notified of your reviews, and properly troubleshooting an issue through them is nearly impossible. Instead, please either use the issue tracker (preferred), add-on support forums , or just message me at andreykaiu@gmail.com. Constructive feedback and suggestions are always welcome! VERSIONS 1.3, date: 2026-07-30. Audio in the preview. The cue position and A-B range are saved for each file. 1.2, date: 2026-07-27. Fixed a hook handler that could affect other addons. 1.1, date: 2026-07-26. First release ========================= See my other addons and decks here: https://ankiweb.net/shared/by-author/1188253433 =========================

GitHub repository: andreykaiu/audio-playback-controls---mod-kaiu-2026
Repository description: An add-on for Anka that adds many audio management features.
Languages: Python, JavaScript, CSS