New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to adjust volume of sounds #1409
Comments
Comment 2 by jteh on 2011-03-09 06:15 |
Comment 3 by aleksey_s on 2011-03-09 06:55 |
Comment 4 by KevanGC on 2011-03-09 06:59 |
Comment 5 by jteh on 2011-03-09 07:03 |
Comment 6 by aleksey_s (in reply to comment 5) on 2011-03-09 07:15
Right, I didn't say it would be in voice settings.
Then we should consider separate control for beeps as well. My point is that there should exist a control which manages the whole volume, and individual adjustments should be possible also. What about sound effect factor and tones factor? this way user can adjust entire volume as well as tune, say, sound effects factor to be 80% of the entire volume. |
Comment 7 by jteh on 2011-03-09 07:45 |
Comment 10 by driemer.riemer@... on 2013-04-12 04:42 |
Comment 11 by briang1 on 2013-04-12 07:53 with regard to matching sounds and voice. Really if you are going to do this then maybe the system sound and the voice sound are all you need. However in one case it will be a balance sound level with systems sound then the normal volume controll can be used for both. sound level for voices is different on different voices ands synths so I can understand the need to have some control. |
Comment 12 by Q on 2013-04-12 13:09 My proposal: |
Comment 13 by jteh on 2013-04-24 02:18 So I've created an initial implementation of this that seems to work. Now any sound played through nvwave.playWaveFile scales its volume to that of the synthesizer. It makes things like entering/exiting browse mode when your synthesizer is turned down much more tolerable. |
Comment 14 by jteh (in reply to comment 12) on 2013-04-24 02:35
As noted in comment:11, I'm pretty sure they aren't actually louder. It depends on the frequency response of your listening equipment. With my decent headphones, higher beeps don't seem louder, but with my notebook speakers, they do, since my notebook speakers have crappy low frequency response.
If there is actually an issue, yes, please file another ticket.
IN general, your proposal makes sense, but there are problems:
In short, the UI is the problem here and adapting it to fit this feature will require a great deal of change. One option that was suggested is to a have a checkbox in the Synthesizer dialog named "Volume of NVDA sounds follows voice volume", "Link volume of NVDA sounds to voice volume" or similar. This is not entirely elegant, but it solves the problem in a fairly clear and intuitive way. It should probably be disabled by default to avoid confusion and so users understand what they are choosing to do. |
Comment 15 by jteh (in reply to comment 13) on 2013-04-24 03:27
Actually, !WaveOutSetVolume seems to affect the volume of the entire application, even if I change the -1 you specify to self._waveout (which is the instance specific wave out handle). It may even affect the entire system in XP. This is problematic because synthesisers control their own volume (and we don't handle audio output for all of them). (Imo, MSDN doesn't document this properly.) This means the volume is reduced by more than intended.
This needs to affect tones as well, but I assume you hadn't gotten around to that rather than it being an oversight.
Here's what's happening:
|
Comment 17 by blindbhavya on 2014-11-03 17:45 |
This is still giving a terrible user experience for the default case in 2016. Please stop hurting my ears. |
I agree with this. I think there should definitely be an option to tie On 1/13/2016 12:56 PM, Christopher Toth wrote:
|
Merely introducing another option in the Voice Settings dialog or the Synthesizer Settings dialog to configure both the sounds and tones of NVDA combined would suffice, in my opinion. An average user would not differentiate between NVDA's sounds, tones and beeps, and thus rolling all of their customizability into one control should not be restrictive at all. Splitting this proposed option into sounds and tones, on the other hand, may seem unnecessary clutter and an overkill for some. Upon reading the discussion on this ticket though, I reckon I agree that merging this proposal into the Voice Volume option itself would be counter-intuitive. Could this ticket, if possible, please also be prioritized since there seems enough demand for this facility viewing the number of other tickets it blocks or at least assigned a priority? |
Its hard to prioritise this above the current core projects. The demand is clear, and this seems to be an important problem to solve. On the other hand, at this stage, it is not clear what the preferred UX or implementation would be. This makes the implementation cost high. I'll set this as a P3 for now. If we can become more certain about the UX and try to simplify the issue and thus the cost of implementing this then we may be able to make it a P2. |
I would just like to put my point of distress. |
A few thoughts:
|
Perfect, thank you, I agree with the proposal of two volume controls, one for the synthesizer, and one for all nvda sounds, including beeps and all sounds of adons including beeps. This new volume setting, can stay within the voice setup window.
Enviado do meu iPhone
… Em 24 de ago de 2017, às 07:31, bhavyashah ***@***.***> escreveu:
A few thoughts:
@derekriemer notes in #1409 (comment) that the volume of tones (such as the beeps for progress bar updates) increases as it goes higher. This is undesirable since a user only expects the pitch to increase and the volume of the tones to remain constant. However, @Brian1Gaff's
#1409 (comment) and @jcsteh's agreement expressed in a later comment together suggest that this is a fallacy resultant of the varying frequency responses of different audio playback equipment. Derek, do you still maintain your original stand or do you agree with Brian and Jamie's explanations? Regardless, as Jamie notes in #1409 (comment), if this actually turns out to be an existent issue, it would require a separate ticket.
I am of the opinion that a single volume control for all NVDA (.wav) sound schemes should be controlled by one slider. While counter-intuitiveness may be a concern, placing this slider in the Synthesizer Settings dialog or in the Voice Settings dialog sounds equally fine to me. I do agree that the proposed sound volume option should be synth specific so that a user can customize the sound volume relative to the loudness of every speech synthesizer individually. The current Volume slider in the Voice Settings dialog can be renamed to Voice Volume and another slider named Sound Volume can be added. This would allow for it to be accessed by the Synth Settings Ring.
I am not too sure I agree with the implementation of or understand the need for a "Volume of NVDA sounds follows voice volume" option. This sounds unnecessary to me.
As noted in @feerrenrut's #1409 (comment), we must discuss the UX completely so as to facilitate this ticket's reprioritization to potentially a P2. CC @fernando-jose-silva @ctoth @Laughingthunder @LeonarddeR and others
—
|
From #1409 (comment):
I couldn't agree more, I am an accessibility developer and tester at PhET Interactive Simulations and I get a headache after just a few minutes because of the enter/exit forms-mode sounds. This would be a wonderful improvement to your amazing project! Thanks! |
My biggest one is the progress beeps. If I turn speech down the beeps
don't go with it and become too loud.
|
there was 12 years passed and no solution was done. |
I think I am with Derek, turning down speech volume should turn down sounds volume as well. otherwise the settings would be to granular and people would get overwelmed by having to adjust tones of volume settings depending on how many profiles they are using. Maybe using other wav sounds with a softer texture would improve the user experience. I propose to also change the checkbox "play sounds" in NVDA general settings to a list with checkboxes, where people can mute and unmute different sounds in NVDA, i.e. progress bar, browse and focus mode, start and exit. The individual sound muting settings are mainly changed on a global scale rather than on a specific profile. |
I'm just sad that it's 12 years since the original bug report, I implemented something that would have at least worked, and we're still discussing this. Rather than blocking patches that aren't perfect until a perfect solution has been developed, I feel this project would make far more progress if it were willing to iterate and make improvements as they came, even if they weren't perfect. I know that for me, every time my ears are blown out by the inappropriately-loud form field sound when the speech volume is turned all the way down, I think negatively about this. It would be a good idea to replace all NVDA Sound Output, in fact, using something like https://miniaud.io/ Then all sound volume could be unified and we wouldn't have to worry about odd quirks of WaveOut. Whatever we end up doing, I hold this truth to be self-evident: |
In the WASAPI backend in #14697, I've just added support for configuring specific audio sessions (007b6fc). Tones and wave files have been split into a separate "NVDA sounds" session, which means this volume can be set independently using the system Volume Mixer. Undoubtedly, this won't be good enough for some people, since it isn't configurable from within NVDA's own UI and it doesn't change with the volume of the voice. However, changing the two together isn't desirable for everyone either. And having too many options is difficult to maintain and too complex for some people. So we can't win whatever way we go. Regardless, this at least partially addresses the concern, since users will now have some way of adjusting the volume of sounds, even if they don't love it. This change also makes it possible to set the session volume via nvwave, so a check box could be added to make the volume of sounds follow the voice volume if so desired. |
There's truth in that. On the other hand, the only solution thus far would have suited one use case (tying sound volume to voice volume) and regressed another use case (users who absolutely don't want sound volume tied to voice volume). The comments on this issue have made it pretty clear that both use cases are real and not imagined. As it is, I suspect you're not going to like the solution I've come up with above because it doesn't tie the two together and because you have to open the system Volume Mixer to use it. It's not perfect, but at least it doesn't break people who depend on them remaining separate.
And yet, as noted above, there are multiple use cases we have to address here, some of which negatively impact others. One person's "not perfect but workable" is another's "this breaks me on a daily basis". |
NVWave still does not have a possibility to simply set a volume of sounds, not talking about adjusting it from an ui. I have an addon and wanted to adjust volume of playWaveFile with my own addon UI but as i understand, nvwave doesn't have such possibility. @ctoth Do you still have that patch around? I was searching on my pc such piece of code but unfortunately was not able to find and that dropbox link is not working anymore. |
nvwave currently doesn't, but the WASAPI version of nvwave in #14697 now does. @ctoth's original patch only set the volume for the entire application, not individual streams/sessions. See #1409 (comment). |
This change also makes it possible to set the session volume via nvwave, so a check box could be added to make the volume of sounds follow the voice volume
if so desired.
If that checkbox being set true was made the default, so it didn't take a
technical user to know what had to be done to make it work like most people
expect, I think that would go a long way to making this a non-issue.
|
I agree with @XLTechie on the checkbox suggestion. Jamie huge thanks to you and the guys from NV Access for working on the audio output stuff, writing more than 1,000 lines of code in this project is really a huge talent. Really amazing. @ctoth I understand totally your frustration. On the other hand, I also understand the developers who want to provide a solution that is really improving user experience and does not result in lots of additional issues or important functionalities being broken. I'd say don't loose your motivation, even when things take long time to happen. This is the only way we can stand out against purely commercial solutions that often do as much as open source solutions or even less. |
Looking at all the comments here, I'm still not convinced that having this check box (once implemented) default to enabled is actually "what most people expect". This is largely because there is no guarantee that a given voice will have an equivalent volume to the sounds; see the comments above regarding some OneCore voices, for example. Thus, I think the correct approach here is to get the check box implemented, default it to disabled and then see where we land. This minimises risk while giving users an option if they want it. |
Personally for me it does not matter will it be enabled by default or not. It would be better to find a way to implement concrete volume control in nvwave itself. |
We need WASAPI for controlling both via the System Volume Mixer and via nvwave. It just isn't worth implementing it for WinMM at this point. The intention is now to get WASAPI enabled by default in alpha as soon as possible to get maximum possible feedback. |
Yes, that makes sense if it will be enabled by default |
NVDA's existing audio output code (nvwave) is largely very old and uses WinMM, a very old legacy Windows audio API. It is also written in pure Python, contains quite a few threading locks necessitated by WinMM, and parts of it have become rather difficult to reason about. There are several known stability and audio glitching issues that are difficult to solve with the existing code. Description of user facing changes At the very least, this fixes audio glitches at the end of some utterances as described in #10185 and #11061. I haven't noticed a significant improvement in responsiveness on my system, but my system is also very powerful. It's hard to know whether the stability issues (e.g. #11169) are fixed or not. Time will tell as I run with this more. Description of development approach 1. The bulk of the WASAPI implementation is written in C++. The WASAPI interfaces are easy to access in C++ and difficult to access in Python. In addition, this allows for the best possible performance, given that we regularly and continually stream audio data. 2. The WinMM code fired callbacks by waiting for the previous chunk to finish playing before sending the next chunk, which could result in buffer underruns (glitches) if callbacks were close together (Python 3 versions of NVDA produce a scratch in the speech when finishing the end of a line #10185 and Texts with multiple line spacings are voiced with NVDA + down arrow and voices crack #11061). In contrast, the WASAPI code uses the audio playback clock to fire callbacks independent of data buffering, eliminating glitches caused by callbacks. 3. The WinMM WavePlayer class is renamed to WinmmWavePlayer. The WASAPI version is called WasapiWavePlayer. Rather than having a common base class, this relies on duck-typing. I figured it didn't make sense to have a base class given that WasapiWavePlayer will likely replace WinmmWavePlayer altogether at some point. 4. WavePlayer is set to one of these two classes during initialisation based on a new advanced configuration setting. WASAPI defaults to disabled. 5. WasapiWavePlayer.feed can take a ctypes pointer and size instead of a Python bytes object. This avoids the overhead of additional memory copying and Python objects in cases where we are given a direct pointer to memory anyway, which is true for most (if not all) speech synthesisers. 6. For compatibility, WinmmWavePlayer.feed supports a ctypes pointer as well, but it just converts it to a Python bytes object. 7. eSpeak and oneCore have been updated to pass a ctypes pointer to WavePlayer.feed. 8. When playWaveFile is used asynchronously, it now feeds audio on the background thread, rather than calling feed on the current thread. This is necessary because the WASAPI code blocks once the buffer (400 ms) is full, rather than having variable sized buffers. Even with the WinMM code, playWaveFile code could block for a short time (nvwave.playWaveFile not fully async #10413). This should improve that also. 9. WasapiWavePlayer supports associating a stream with a specific audio session, which allows that session to be separately configurable in the system Volume Mixer. NVDA tones and wave files have been split into a separate "NVDA sounds" session. WinmmWavePlayer has a new setSessionVolume method that can be used to set the volume of a session. This at least partially addresses Ability to adjust volume of sounds #1409.
This issue got a bit conflated. There were two requests here: the ability to control the volume of sounds in general, and the ability to link the volume of sounds to NVDA's speech volume. The former is implemented by #14697. The latter is implemented by #14896. Thus, I think this should be closed by #14896 for completeness. |
#14896) Fixes #1409. Summary of the issue: Users would like to be able to control the volume of NVDA sounds. With the WASAPI implementation in #14697, it is possible to separately control the volume of NVDA sounds using the Windows Volume Mixer. However, it is often useful to link the volume of NVDA sounds to the volume of the voice. Description of user facing changes It is now possible to have the volume of NVDA sounds and beeps follow the volume setting of the voice you are using. This option can be enabled in Advanced settings. Description of development approach When this option is enabled and a WasapiWavePlayer is using soundsSession, the open() and stop() methods of WasapiWavePlayer set the session volume to the synth's voice volume. Note that we do this in stop() because some players keep the device open; e.g. tones.
Better solution for #1409. Addresses #14896 (comment). Also addresses feedback I received on Mastodon regarding the NVDA sounds volume not appearing in the Windows Volume Mixer in some versions of Windows. Summary of the issue: In Support for audio output using WASAPI #14697, I split NVDA speech and sounds into two separate Windows audio sessions to allow independent control of their levels. However, some users want these levels to be linked. In Add setting to have the volume of NVDA sounds follow the voice volume. #14896, I made it possible to have the sounds volume follow the voice volume. However, as per Add setting to have the volume of NVDA sounds follow the voice volume. #14896 (comment), some synths don't set the volume in a linear way, so the volumes don't match. It was reported to me on Mastodon that in Windows 11 Insider builds, the "NVDA sounds" volume doesn't show up in the Windows Volume Mixer unless you actively play a sound while the Volume Mixer is running. This is not very intuitive, and if this is behaviour Microsoft intends to keep, it isn't going to work well for our users. Having the volume of NVDA sounds controlled outside of NVDA is a little cumbersome. Description of user facing changes There will now only be one entry for NVDA in the Windows Volume Mixer which will control all NVDA audio. There will be a slider in NVDA Advanced Settings to control the volume of sounds. Description of development approach Removed the ability to set a WASAPI session and volume. Added a method to set the volume of a stream. This also allows you to set the volume of individual channels, though that's not used yet. Added a slider in Advanced Settings to control the volume of NVDA sounds. This is disabled if the sound volume is following the voice volume.
Reported by KevanGC on 2011-03-09 06:12
Hi,
I've noticed that when you're browsing the web and you switch between Browse and Focus mode, NVDA plays these sound-effects. The sound-effects are very loud and sometimes they get annoying. It would be cool if you could add a feature for users to adjust the volumes of sound effects and progress-bar tones?
Blocking #892, #2978, #3100, #4590
The text was updated successfully, but these errors were encountered: