-
-
Notifications
You must be signed in to change notification settings - Fork 642
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
make the audio device still active for better response #5172
Comments
Comment 2 by nvdakor on 2015-06-20 21:48 |
Comment 3 by ondrosik on 2015-06-20 22:18 |
Comment 4 by jteh on 2015-06-22 01:31 If this isn't fixing the delay issue, keeping the device open isn't going to be enough. This is rather odd because this is exactly what media players do when you pause them and you're suggesting that pausing a media player is enough. |
Comment 5 by ondrosik on 2015-06-22 07:13 |
Comment 6 by ondrosik on 2015-06-22 07:57 |
Comment 7 by driemer.riemer@... on 2015-07-28 00:23 The evidence for my thought is closeWhenIdle=True would close the device. |
Comment 8 by jteh (in reply to comment 7) on 2015-07-28 01:03
It's not intentional. It's a bug/deficiency. See #400. |
@derekriemer I believe you were working on a Play Silence add-on at one point in time. Was that related to this ticket in any way? |
It seems that this is becoming more and more common with modern dell sound cards, and the unspoken addon by @camlorn randomly fixes the problem, although I don't know what he does differently than NVDA to hold the sound card hostage. @feerrenrut Any idea on priority? This issue is very annoying for those who have it, making NVDA very very annoying to use and nearly useless on new dell sound cards.Instead of hearing hello, you'd hear ello, (To be clear, the first sylibal of every utterance is cut off after a pause of speech over half a second or so). |
Based on the impact (skipped sounds) of this, I would consider this is fairly important. The questions that come to mind are:
Without being able to reproduce this, it will be difficult to fix. Essentially requiring a process of sending builds to users who report the problem until we have the confidence that this does fix the problem without introducing any other issues. |
I had a dell laptop in here a couple of weeks ago, dual booting xp and 7.
Neither would work through the internal card without cropping of the end of
speech a lot. I ended up plugging in an el cheapo usb sound device through a
couple of speakers. Liuckily the guy is sighted or it would have made him
send it through the window.
However its odd as i have a Dell of 2013 vintage with none of this issue at
all.
Brian
bglists@blueyonder.co.uk
Sent via blueyonder.
Please address personal email to:-
briang1@blueyonder.co.uk, putting 'Brian Gaff'
in the display name field.
----- Original Message -----
From: "Derek Riemer" <notifications@github.com>
To: "nvaccess/nvda" <nvda@noreply.github.com>
Cc: "Subscribed" <subscribed@noreply.github.com>
Sent: Sunday, August 20, 2017 5:29 PM
Subject: Re: [nvaccess/nvda] make the audio device still active for better
response (#5172)
… It seems that this is becoming more and more common with modern dell sound
cards, and the unspoken addon by @camlorn randomly fixes the problem,
although I don't know what he does differently than NVDA to hold the sound
card hostage. @feerrenrut Any idea on priority? This issue is very
annoying for those who have it, making NVDA very very annoying to use and
nearly useless on new dell sound cards.Instead of hearing hello, you'd
hear ello, (To be clear, the first sylibal of every utterance is cut off
after a pause of speech over half a second or so).
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#5172 (comment)
|
I have seen something like this in some form on almost every computer I have ever used any screen reader on for the last 8 or so years, fortunately (but not always) fixable by disabling enhancements in control panel. Unspoken fixes it because Unspoken never closes the audio device and is always writing zeros. The sound card can't distinguish between that and actual audio, and so holds onto all resources. there's nothing else special in Libaudioverse that would change anything--it's just using NVWave in that add-on, not my (admittedly buggy) backends. I'm not going to be fast to respond to e-mail for a while so if someone wants to ask specific questions it might be best to grab me via IRC or something. |
I'm seeing this with Realtek High Definition Audio on a Lenovo P51, even with enhancements disabled. The first sound played after audio has been closed incurs about a half second of lag when a headset is connected (not USB). Curiously, the lag is less (though still not instant) when using the laptop's speakers. This happens even if I exit NVDA and cause a Windows sound to play; e.g. by pressing backspace on a button in the Run dialog. So, this is definitely something related to the audio hardware/driver. Note that updating drivers, etc. does not resolve the issue. There are two options here:
There's also the question of whether we want to make this configurable and what the default should be. One concern is that an option like this isn't going to make sense to most users, so it should be considered an advanced setting. It's perhaps worth rolling this out as a hidden config option first so people can try it out. |
I don't understand what is going on here, as some cards chop at the end some
at the start, yet they all seem not to do this on normal windows sounds.
the thing I notice though is that most modern machines have some kind of
semi intelligent system monitoring the sockets and identifying what is
plugged in and also quite often if you monitor inputs on these machines the
latency between the input and output of the monitor is far longer than is
comfortable if monitoring a microphone, sounding very like it used to be on
old three head tape decks. I was just wondering if these issues are
connected in some odd way.
Although how it manages to do system sounds without cropping eludes me This
is one reason why I now use an external usb sound device over the built in
one.
Brian
bglists@blueyonder.co.uk
Sent via blueyonder.
Please address personal email to:-
briang1@blueyonder.co.uk, putting 'Brian Gaff'
in the display name field.
-----
|
@jcsteh, @feerrenrut, @michaelDCurran, I have found a very helpful vbs script which solves this problem, see the issue referenced by @LeonarddeR above. Could something like that be implemented in NVDA at start? |
cc: @mltony |
My NVDA add-on BluetoothAudio fixes this issue by playing silence to prevent wireless headsets from entering standby mode. To optimize battery usage, it only plays silence for 1 minute (configurable parameter) after the last speech command. |
…io played for 10 seconds. (PR #11024) Fixes #5172 Fixes #10721 ## Summary of the issue: - As described in #5172, some audio drivers/hardware take a long time to open the device and/or truncate the start/end of the audio. - As described in #10721 (comment), calling WaveOutOpen in the OneCore synth callback mysteriously blocks (and thus lags) for ~100 ms. Because we close the audio device on idle, we can trigger this problem. Although #11023 mostly fixes this, it's impossible (or at least very difficult) to resolve this completely from within the OneCore driver. - Aside from all of this, closing and opening the audio device for rapid short utterances (e.g. rapid movement with the cursor keys or typing) doesn't seem particularly optimal. It's difficult to measure this, but I'd say mitigating this is likely to make audio performance faster/smoother. ## Description of how this pull request fixes the issue: When WavePlayer.idle() is called and closeWhenIdle is set, instead of closing the device immediately after the audio finishes, set a timer. If audio is played before the timer elapses, stop the timer. Close the device when the timer expires.
Fixes #5172 Fixes #10721 Fixes #11482 Fixes #11490 ### History #5172 Some audio drivers/hardware take a long time to open the device and/or truncate the start/end of the audio. #10721 Calling WaveOutOpen in the OneCore synth callback mysteriously blocks (and thus lags) for ~100 ms. Because we close the audio device on idle, we can trigger this problem. Although PR #11023 mostly fixed this, it's impossible (or at least very difficult) to resolve this completely from within the OneCore driver. PR #11024 attempted to fix these issues by waiting 10 seconds before closing the audio device" ### Problem to solve Subsequent to #11024, there are occasional exceptions from nvwave, particularly when switching synthesisers. In particular the following cases need to be handled smoothly: - When using Microsoft Sound Mapper, NVDA should use the Windows default device (even if it changes) - When the NVDA configured devices becomes invalid, nvWave should fall back to Microsoft Sound Mapper - When the NVDA configured device becomes available again, NVDA should switch back to using it. - Handle no audio device at all. Since these issues needed to be fixed, and also: - Closing and opening the audio device was originally introduced to support Remote Desktop audio, this is now better served by other solutions. - Performance is improved by keeping it open, using a timeout means that the lag is more rare, but will still occur. ### How it is solved Instead, now don't close the device at all. As per the discussion: #11505 (comment) To fix issues with current / preferred device: - nvWave now saves the preferred device when it is constructed. - If using a device fails, it is considered unavailable, nvWave attempts to fall back to "Microsoft Sound Mapper". - From my testing, using "Microsoft Sound Mapper" correctly handled changing the default device (Win 10 2004). It would be helpful if others could confirm, especially on different OS versions. - During `_idleUnbuffered` - The current device is checked to see if it matches the preferred device. - The available devices are polled to see if the preferred device is available, if so it switches.
Reported by ondrosik on 2015-06-20 21:39
Some audio devices have power management system which disables the device when it doesn't play any audio. This makes NVDA less responsive. When you press a key and NVDA wants to say something, you need to wait few miliseconds because the device needs to initialize, and after that play the sound, in this case speech synthesys. This also applies when you for example spell the statusbar or titlebar - spaces between characters are longer. The solution is really simple, Play silence. to the device all the time or somehow make it still active. When you run audio player such as winamp, NVDA is really more responsive, also when you pause the player. I think that we should integrate to NVDA something which will make the soundcard active all the time when NVDA is running. In most situations user can not disable this power management. In older soundcards, there was a comfig file or specific driver related dialog where this was possible, but nowadays it seems that mostly user can't do nothing about it.
The text was updated successfully, but these errors were encountered: