mnogu / adjust-sound-volume Goto Github PK
View Code? Open in Web Editor NEWAnki 2.1.20+ add-on to adjust the sound volume
License: GNU Affero General Public License v3.0
Anki 2.1.20+ add-on to adjust the sound volume
License: GNU Affero General Public License v3.0
Hi,
I have cards from a great variety of sources, all with different volume calibration, so Adjust Sound Volume is very useful for me. Thanks! ^_^
When I added the add-on Advanced Answer Sounds I found that no matter how low I calibrate the volume in this add-on’s settings or by modifying the audio files the answer feedback always sounds loud. After some head scratching I found the ‘culprit’: Adjust Sound Volume was doing its job all to well…
Is there a way to add an exception so the volume of certain files is not automatically adjusted?
The audio files used by that add-on are in …/addons21/1167194350/user_files/
:
again.wav
easy.wav
error.wav
good.wav
hard.wav
sched buried.wav
suspended.wav
user buried.wav
Thank you very much! ^_^
Júda
Audio normalization does not seem to work with audio files with the opus
codec
I've uploaded a sample file here:
CpCXzX55bJE_PT00H41M21.230S_PT00H41M42.310S.zip
Try to tweak the Integrated loudness
slider and you'll notice that the volume of other audio files will get affected while this particular file does not.
I'm using Anki 2.1.49 (dc80804a) on Windows 10
I don't use a lot of volume cards but I do listen to music via headphones so whenever an Anki notification (like the Sync in one direction pop-up) comes up and bings in my ear, It is Stupid loud and annoying. so I downloaded this add-on in hopes I could stop that from happening but adjusting the volume doesn't change those sounds at all. IDK if it's not functioning properly or if it's not actually designed to be part of the add-on but either way I thought id drop it here just in case.
When normalization feature is on, anki always waits until audios are palyed to the end before it responds to my keystroke. This causes perceptible laspses for both flipping and going to the next card, if there are audios playing.
By "can't be interrupted" in the title, I do not mean the "interrupt" as in "interrupt current audio when answering" option in anki preferences. Even you untick that option (so that audios become uninterrupted), without normalization of this addon, it only leaves the audio playing after you answer a card, but there is no lapse before showing the next card.
Tested on Anki Version 2.1.42 with the newest Adjust Sound Volume addon.
Hi Muneyuki,
Thank you for sharing this add-on.
I ended up having an issue with it slowing down my reviews. Do you know if this add-on could be modified to adjust volume on startup and when settings are changed (instead of registering the functionality to the av_player_did_begin_playing hook)?
Thank you,
Victoria
I have a lot of mono audio files in my collection, which doesn't work well with the default loudnorm
options (these files usually sound way too quiet with the filter). To deal with mono audio files properly, you need to set the dual_mono
option in the loudnorm
filter to true
.
So it would be nice if this option can be added to the settings menu.
Would it be possible for you to introduce normalization? I am not sure if this is the right technical term for this. But I want every sound file to be played in Anki with mpv at the same volume level.
I am on Manjaro Linux.
I’ve just updated Anki from 2.1.65 to 23.10.1 (fac9e0e
) and now the add-on doesn’t work. The debug info has this error message:
Anki 23.10.1 (fac9e0e) Python 3.11.6 Qt 6.6.1 PyQt 6.6.1
Platform: Linux-6.6.7-arch1-1-x86_64-with-glibc2.38
Flags: frz=False ao=True sv=3
Add-ons, last update check: 2023-12-14 23:00:56
When loading Adjust Sound Volume:
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/aqt/addons.py", line 245, in loadAddons
__import__(addon.dir_name)
File "/home/foo/.local/share/Anki2/addons21/2123044452/__init__.py", line 200, in <module>
action.triggered.connect(VolumeDialog(mw).show)
^^^^^^^^^^^^^^^^
File "/home/foo/.local/share/Anki2/addons21/2123044452/__init__.py", line 113, in __init__
volume_label, self.volume_slider, self.volume_spin_box = _create_config_widgets(
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/foo/.local/share/Anki2/addons21/2123044452/__init__.py", line 85, in _create_config_widgets
label.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Preferred)
^^^^^^^^^^^^^^^^^^^^^
AttributeError: type object 'QSizePolicy' has no attribute 'Expanding'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.