40 5
Contact Author Sign in to rate

Control Audio

<10kB. Updated 2020-08-25.

Description

This add-on is quite simple and easy to use. It gives you increased control over audio playback. Default audio play speed is set at 1.0. Features/Functions -> stop audio: Press "8", to stop audio. -> faster audio: Press "]", to stop audio and increase audio play speed by 0.1. Press your replay key (default: "r") to play at the changed audio speed. -> slower audio: Press "[", to stop audio and decrease audio play speed by 0.1. Press your replay key (default: "r") to play at the changed audio speed. Support Website Github: here Known or Possible Issues Please check the Github issues tab. JUST FOR FYI: ***Multi audio cards induce crashes (WIP) ***Smashing audio controls in quick succession induces crashes Versions v2.0: updated to work with 2.1.29+ transfer addon maintenance v1.9: updated to work with 2.1.17+ stable (but will no longer work with 2.1.16 or earlier) v1.8: updated to work with 2.1.4+ stable release (thanks Nick) v1.7: updated to work with 2.1.18+ beta (thanks dae) v1.6: updated to work with 2.1.13+ beta v1.5: updated to work with 2.1 alpha and beta testing (thanks dae) v1.4: expanded right handed use functions. v1.3: updated to include skipping forward, skipping backwards and stopping audio (contributed by Andy) v1.2: updated to work with 2.0.24+ v1.1: pausing only If you have any problems with this add-on, please visit the Github page and post issues. Also, if you are python programmer or Anki add-on developer and have ideas to expand the functionality of this add-on, please visit the Github page and post issues.

Download

As add-ons are programs downloaded from the internet, they are potentially malicious. You should only download add-ons you trust.

Supported Anki versions:

To download this add-on, please copy and paste the following code into Anki 2.1:

1591259314

If you were linked to this page from the internet, please open Anki on your computer, go to the Tools menu and then Add-ons>Browse & Install to paste in the code.

All Anki 2.1.x Add-Ons Contact Author

Reviews

on 1658255555
hi, this still works /w anki v2.1.54, Qt6!

as someone mentioned, download the 3 files from github, then copy into anki's addon folder.

however it works in "study" mode but not working in "preview" mode but still great. thx
on 1649701547
is not compatible with the last version of anki, but with the 2.1.35 works well
on 1647557137
doesnt work with new anki
on 1636435027
Helps me tremendously! Great for getting in the flow with large audio decks.

For anyone struggling to import it directly through Anki using the code (mine said, latest update unsupported) I just dragged the folder from the github page into my Anki addons folder and restarted. Works perfectly now!
on 1630259195
Assuming the crashing issue is eventually resolved and I can one day actually use this add-on, which keys would I use to skip between multiple audio files on a single card? I don't see it in the description or in the Anki tools tab, although it says it's possible in one of the listed version updates below the description. For my particular needs, skipping between audio files on a single card is the most important feature, so if it's indeed possible and if you can get the crashing issue resolved, then this could be an incredibly useful add-on.
on 1617716748
perfect!!!!
on 1616758881
Very helpful!!! I very appreciate what you have done for us. One thing I noticed is that app crashes when there are multi audios in the card
on 1611725695
It works on Anki 2.35. Thanks
on 1610492347
The add on is brilliant, but when I use this add-on Anki crashes like 20 seconds after I use it and speed up the audio.
Application Specific Information:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'NSWindow drag regions should only be invalidated on the Main Thread!'
abort() called
terminating with uncaught exception of type NSException
on 1609310518
Update 2020-12-29 – Regrettably I am having unexpected crashes. In some cases this led to my losing what I’ve been doing for the past ten or so minutes. I’ve now disabled the addon.

~~~

Many thanks! It’s working great. I use it to slow down audio from 1.0 to 0.9 – the key is `[` (contrary to the description above).

Anki Version 2.1.35 (84dcaa86)
Python 3.8.0 Qt 5.14.2 PyQt 5.14.2
macOS 10.14
on 1609204250
I'm working properly!
on 1605410176
I upgrade to Anki 2.1.35 yesterday.

When I learnt cards a prompt 'Set audio speed to x.xx' will be popped up. And it's always there, don't go away. When I move the main window of Anki, more appear.

It's so annoying.

How to get rid of them?

show_notif should be configurable BTW.
on 1591407059
Anki 2.1.26 (70784154) Python 3.8.0 Qt 5.14.1 PyQt 5.14.1
Platform: Windows 10
Flags: frz=True ao=True sv=1
Add-ons, last update check: 2020-06-05 21:16:53

Caught exception:
Traceback (most recent call last):
File "C:\Users\BRSergio\AppData\Roaming\Anki2\addons21\1591259314\Audio_Controls.py", line 31, in <lambda>
keys.append(("n", lambda: writeAndFlush(b"pause")))
File "C:\Users\BRSergio\AppData\Roaming\Anki2\addons21\1591259314\Audio_Controls.py", line 8, in writeAndFlush
mm = aqt.sound.mplayerManager
AttributeError: module 'aqt.sound' has no attribute 'mplayerManager'
Comment from author
Thanks for this report. Most of the features of this add-on have been incorporated into the core Anki program itself ("5" pauses, "6" skips back 5 seconds, "7" skips forward 5 seconds). So this add-on might not be needed any longer. I might still update the add-on, but am going to wait for a few more releases of Anki to see which direction the audio player goes in Anki.
on 1586723849
big-time useful with awesomeTTS for stopping the robot from narrating my mathjax equations
on 1582285491
I have problem on 2.1.20 on Linux.

Debug info:
Anki 2.1.20 (47a1bf8b) Python 3.8.1 Qt 5.14.1 PyQt 5.14.1
Platform: Linux
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2020-02-17 11:38:03
Add-ons possibly involved: Control Audio Playback Pause Skip backwardsforwards Stop Audio

Caught exception:
Traceback (most recent call last):
File "/home/user/.local/share/Anki2/addons21/1591259314/Audio_Controls.py", line 18, in writeAndFlush
mm.togglePause()
AttributeError: 'NoneType' object has no attribute 'togglePause'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/user/.local/share/Anki2/addons21/1591259314/Audio_Controls.py", line 41, in <lambda>
keys.append(("-", lambda: writeAndFlush(b"pause")))
File "/home/user/.local/share/Anki2/addons21/1591259314/Audio_Controls.py", line 24, in writeAndFlush
except anki.mpv.MPVCommandError:
AttributeError: module 'anki' has no attribute 'mpv'

Anki shows me error but it happens so fast that I am not able to read it nor copy it. It even doesn't display it properly so I don't know where this information come from.
https://i.imgur.com/D8bNg1m.png
But I use Customize Keyboard Shortcut add-on and I disabled "-" for bury card.


I wanted to use numeric keypad "-" minus to pause. I used it so far and it was ok before 2.1.20. I also use 5-8 from numeric keypad for ReMemorize Buttons add-on.


Here is my configuration:
def addKeys(keys):
if platform == "win32":
# Windows
keys.append(("<nop>", lambda: writeAndFlush(b"pause")))
keys.append(("<nop>", lambda: writeAndFlush(b"stop")))
keys.append(("-", lambda: writeAndFlush(b"pause")))
keys.append(("<nop>", lambda: writeAndFlush(b"seek -5 0")))
keys.append(("<nop>", lambda: writeAndFlush(b"seek 5 0")))
keys.append(("<nop>", lambda: writeAndFlush(b"stop")))
else:
# Mac
keys.append(("<nop>", lambda: writeAndFlush(b"pause")))
keys.append(("<nop>", lambda: writeAndFlush(b"stop")))
keys.append(("-", lambda: writeAndFlush(b"pause")))
keys.append(("<nop>", lambda: writeAndFlush(b"seek -5 0")))
keys.append(("<nop>", lambda: writeAndFlush(b"seek 5 0")))
keys.append(("<nop>", lambda: writeAndFlush(b"stop")))

Can you provide github address or any other contact for easy communication, please.
on 1580863721
Try make update velocity control.
despite it's all ok
on 1577475230
não está funcionando muito bem. Eu gostaria de reproduzio o audio varias vezes.
on 1576961330
Great!
on 1574272621
ready
on 1572323371
I need it!
on 1570992404
Thank you so much
on 1568106486
Very helpful! Thanks.
on 1567990844
good
on 1561608389
Good
on 1553796314
1591259314
on 1552405725
helpful
on 1545402486
Very good
on 1534472204
works, just what I needed, thanks!
on 1497484800
on 1492560000
on 1487203200
on 1485043200
on 1475971200
on 1475452800
on 1470700800
on 1461888000
love it

it very useful for listen
on 1455321600
s

on 1451347200
on 1441843200
on 1435104000
Help me

past :
I have a problem , copy code and paste in the correct place but open error box ( code is incorrect )
why?

answer : I cand solve problem , it is very easy , I should Turn off VPN or Proxy ,

:-)
on 1429833600
on 1419206400
Remarks

A brillant addon !

1. Would it be possible to stop all the sounds when there are several sounds on a same card ?

2. One thing "is" missing (if it is at least possible it exists): an option to let you disable the automatic playback of the sound, attributing a keyboard shortcut to play the sound if and when you want.

Thanks a lot whatever.
on 1409616000
Very helpful to break down long audio

on 1397520000
Love it. Does what is says.

This is a nice feature. Thanks.
on 1392681600