Skip to content
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

Play silence to prevent missing information at start of speech #14386

Closed
thadeu220 opened this issue Nov 20, 2022 · 8 comments · Fixed by #16099
Closed

Play silence to prevent missing information at start of speech #14386

thadeu220 opened this issue Nov 20, 2022 · 8 comments · Fixed by #16099
Labels
component/audio NVDA's audio output (nvWave, issues with usb audio etc). feature p3 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority triaged Has been triaged, issue is waiting for implementation.
Milestone

Comments

@thadeu220
Copy link

thadeu220 commented Nov 20, 2022

Is your feature request related to a problem? Please describe.

When using some bluetooth headphones, speech output is not heard after NVDA has some moments of silence.
The headphones appear to go into standby and miss the start of speech.
Keeping NVDA active is tiring, missing speech is annoying and confusing.

Describe the solution you'd like

Add an option to play silence to keep NVDA active.

Describe alternatives you've considered

Use bluetooth audio add-on.

Additional context

  • This is a problem that is likely to be common to many users, bluetooth headsets / airpods are very common.
  • This feature is available in Jaws since 2020.
@mzanm
Copy link
Contributor

mzanm commented Nov 20, 2022

Look at the bluetooth audio add-on

@Brian1Gaff
Copy link

Brian1Gaff commented Nov 20, 2022 via email

@Adriani90
Copy link
Collaborator

cc: @jcsteh I think you had submited a pull request on this some time ago right?

@jcsteh
Copy link
Contributor

jcsteh commented Nov 21, 2022

My pull request was to keep the audio device open for longer. That got rewritten somewhat by NV Access, but the core idea got merged already. However, it seems that for some devices, even keeping the device open isn't enough and you actually have to play silence. I never submitted a pull request for that, but the Bluetooth Audio add-on does this.

@feerrenrut feerrenrut changed the title suggestion: add a silence sound to avoid latency on wireless headphones via bluetooth Play silence to prevent missing information at start of speech Nov 22, 2022
@feerrenrut
Copy link
Contributor

feerrenrut commented Nov 22, 2022

While there are some concerns about battery life of the devices, I think this can be mostly mitigated with some logic around when the silence is played, some ideas:

  • Play silence after speech for only x seconds.
  • Start playing silence as soon as NVDA core wakes from sleep.
  • After playing of silence is stopped, buffer next speech, play silence again for Y ms then play speech buffer.

@feerrenrut feerrenrut added p3 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority feature component/audio NVDA's audio output (nvWave, issues with usb audio etc). triaged Has been triaged, issue is waiting for implementation. labels Nov 22, 2022
@cary-rowen
Copy link
Contributor

Would love to see this proposal implemented

@Adriani90
Copy link
Collaborator

I wonder if #14697 will have any positive effect on this?

@jcsteh
Copy link
Contributor

jcsteh commented Apr 21, 2023

Unlikely, but I am curious nevertheless. That said, it should be easier to implement continuous silence with the WASAPI code.

seanbudd pushed a commit that referenced this issue Feb 8, 2024
Fixes #14386

Summary of the issue:
Play silence in order to keep audio device open

Description of user facing changes
By default most users won't notice anything as default volume is 0 (playing silence).
I added two config options in the advanced panel: silence duration (default = 30 seconds) and white noise volume (default is set to 0). Playing white noise would be helpfulin order to debug any user issues related to audio dropout.

Description of development approach
Most of heavylifting has been done by @jcsteh.
In wasapi.cpp there has been added class SilencePlayer that spawns a new thread, that just plays silence/white noise when requested. Requests are coming from python code in nvwave.py from WasapiWavePlayer.feed() function.
@nvaccessAuto nvaccessAuto added this to the 2024.2 milestone Feb 8, 2024
Nael-Sayegh pushed a commit to Nael-Sayegh/nvda that referenced this issue Feb 15, 2024
Fixes nvaccess#14386

Summary of the issue:
Play silence in order to keep audio device open

Description of user facing changes
By default most users won't notice anything as default volume is 0 (playing silence).
I added two config options in the advanced panel: silence duration (default = 30 seconds) and white noise volume (default is set to 0). Playing white noise would be helpfulin order to debug any user issues related to audio dropout.

Description of development approach
Most of heavylifting has been done by @jcsteh.
In wasapi.cpp there has been added class SilencePlayer that spawns a new thread, that just plays silence/white noise when requested. Requests are coming from python code in nvwave.py from WasapiWavePlayer.feed() function.
Adriani90 pushed a commit to Adriani90/nvda that referenced this issue Mar 13, 2024
Fixes nvaccess#14386

Summary of the issue:
Play silence in order to keep audio device open

Description of user facing changes
By default most users won't notice anything as default volume is 0 (playing silence).
I added two config options in the advanced panel: silence duration (default = 30 seconds) and white noise volume (default is set to 0). Playing white noise would be helpfulin order to debug any user issues related to audio dropout.

Description of development approach
Most of heavylifting has been done by @jcsteh.
In wasapi.cpp there has been added class SilencePlayer that spawns a new thread, that just plays silence/white noise when requested. Requests are coming from python code in nvwave.py from WasapiWavePlayer.feed() function.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/audio NVDA's audio output (nvWave, issues with usb audio etc). feature p3 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority triaged Has been triaged, issue is waiting for implementation.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants