Repository: nvaccess/nvda

Issue:
Nvda not announcing all the speeches when using the windows onecore synthesizer
I installed nvda next 14285 and noticed a problem using the windows onecore synthesizer.
By unchecking and selecting a checkbox several more times then nvda does not announce whether the box is unchecked or checked.
It is a problem in the windows onecore synthesizer because when using another synthesizer as nuance vocaliser exprecive and a voice sap5 the synthesizer announces quickly and accurately if the box has been selected or cleared.
Steps:
Go to a checkbox such as:
Save setting when exiting
Within the general options dialog of nvda.
Now press space to uncheck and check this box.
Do this several times.
The expected is that every time nvda announces the status of the box.
The thing is that the nvda announces some times the state of the box.


Discussion:
I am not able to replicate this behavior using NVDA version next-14285,ded94003. I have tried with several checkboxes and all the English voices.


Thanks for the feedback, please check with the voice onecore portuguese Brazil.
Other issues I discovered, the problem does not occur with the next 14240 update, I know that an update was performed to answer another one called mine this week stating that the audio reduction was not working properly.
Finally, the problem seems to be occurring due to the speech of the characters, I have deselected the option of
Speak typed characters
And the problem did not occur.
You can check the option of
Speak typed characters
And try to reproduce the problem.
You can reproduce a similar problem that I believe is related by doing the following:
Select option
Speak typed characters
Now enter the windows 10 start menu, press an arrow below to exit the search field.
Press a letter to focus on a menu item, you would expect the nvda to pronounce
Group and the item focused.
What happens is that for many times the nvda does not say anything.
Already unchecked the box
Speak typed characters
The item that focuses on the start menu is always read when you press a letter.
Remembering that this was all using the Brazilian voice of the onecore.
I am not able to reproduce the first issue, but I am able to replicate the second issue described using OneCore synth.
The more I test this, the more it leads me to conclude that OneCore is somehow introducing significant delays. (See attached log.) With English voices, once character echo is turned on, the delay becomes noticeable. I see instances of the checkbox state not being announced. The log does not reflect this. The difference in time for announcing the state when speak characters is off V. when it's on is significant. For instance, compare the following code snippets. In addition, the time delay is not always reflected in the log. I speculate something similar is happening here as it is in #7475.

#### Log Snippet 1 (with speak characters off)

IO - inputCore.InputManager.executeGesture (11:47:20.260):
Input: kb(laptop):space
IO - speech.speak (11:47:20.339):
Speaking [LangChangeCommand (u'en_US'), u'not checked']
IO - inputCore.InputManager.executeGesture (11:47:20.829):
Input: kb(laptop):space
IO - speech.speak (11:47:20.917):
Speaking [LangChangeCommand (u'en_US'), u'checked']
IO - inputCore.InputManager.executeGesture (11:47:21.309):
Input: kb(laptop):space
IO - speech.speak (11:47:21.418):
Speaking [LangChangeCommand (u'en_US'), u'not checked']


#### Log Snippet 2 (with speak characters on)

IO - inputCore.InputManager.executeGesture (11:47:23.045):
Input: kb(laptop):space
IO - speech._speakSpellingGen (11:47:23.055):
Speaking character u'space'
IO - speech.speak (11:47:23.115):
Speaking [LangChangeCommand (u'en_US'), u'not checked']
IO - inputCore.InputManager.executeGesture (11:47:24.558):
Input: kb(laptop):space
IO - speech._speakSpellingGen (11:47:24.572):
Speaking character u'space'
IO - speech.speak (11:47:24.617):
Speaking [LangChangeCommand (u'en_US'), u'checked']
IO - inputCore.InputManager.executeGesture (11:47:25.549):
Input: kb(laptop):space
IO - speech._speakSpellingGen (11:47:25.563):
Speaking character u'space'
IO - speech.speak (11:47:25.598):
Speaking [LangChangeCommand (u'en_US'), u'not checked']
IO - inputCore.InputManager.executeGesture (11:47:26.700):
Input: kb(laptop):space
IO - speech._speakSpellingGen (11:47:26.716):
Speaking character u'space'
IO - speech.speak (11:47:26.755):
Speaking [LangChangeCommand (u'en_US'), u'checked']
IO - inputCore.InputManager.executeGesture (11:47:27.756):
Input: kb(laptop):space
IO - speech._speakSpellingGen (11:47:27.779):
Speaking character u'space'
IO - speech.speak (11:47:27.819):
Speaking [LangChangeCommand (u'en_US'), u'not checked']
IO - inputCore.InputManager.executeGesture (11:47:29.765):
Input: kb(laptop):space
IO - speech._speakSpellingGen (11:47:29.779):
Speaking character u'space'
IO - speech.speak (11:47:29.819):
Speaking [LangChangeCommand (u'en_US'), u'checked']

[NVDA - OneCore Checkbox delay.txt](https://github.com/nvaccess/nvda/files/1201237/NVDA.-.OneCore.Checkbox.delay.txt)
I agree, thank you

Enviado do meu iPhone

> Em 4 de ago de 2017, às 15:06, PratikP1 <notifications@github.com> escreveu:
> 
> The more I test this, the more it leads me to conclude that OneCore is somehow introducing significant delays. (See attached log.) With English voices, once character echo is turned on, the delay becomes noticeable. I see instances of the checkbox state not being announced. The log does not reflect this. The difference in time for announcing the state when speak characters is off V. when it's on is significant. For instance, compare the following code snippets. In addition, the time delay is not always reflected in the log. I speculate something similar is happening here as it is in #7475.
> 
> Log Snippet 1 (with speak characters off)
> 
> IO - inputCore.InputManager.executeGesture (11:47:20.260):
> Input: kb(laptop):space
> IO - speech.speak (11:47:20.339):
> Speaking [LangChangeCommand (u'en_US'), u'not checked']
> IO - inputCore.InputManager.executeGesture (11:47:20.829):
> Input: kb(laptop):space
> IO - speech.speak (11:47:20.917):
> Speaking [LangChangeCommand (u'en_US'), u'checked']
> IO - inputCore.InputManager.executeGesture (11:47:21.309):
> Input: kb(laptop):space
> IO - speech.speak (11:47:21.418):
> Speaking [LangChangeCommand (u'en_US'), u'not checked']
> 
> Log Snippet 2 (with speak characters on)
> 
> IO - inputCore.InputManager.executeGesture (11:47:23.045):
> NVDA - OneCore Checkbox delay.txt
> NVDA - OneCore Checkbox delay.txt
> Input: kb(laptop):space
> IO - speech._speakSpellingGen (11:47:23.055):
> Speaking character u'space'
> IO - speech.speak (11:47:23.115):
> Speaking [LangChangeCommand (u'en_US'), u'not checked']
> IO - inputCore.InputManager.executeGesture (11:47:24.558):
> Input: kb(laptop):space
> IO - speech._speakSpellingGen (11:47:24.572):
> Speaking character u'space'
> IO - speech.speak (11:47:24.617):
> Speaking [LangChangeCommand (u'en_US'), u'checked']
> IO - inputCore.InputManager.executeGesture (11:47:25.549):
> Input: kb(laptop):space
> IO - speech._speakSpellingGen (11:47:25.563):
> Speaking character u'space'
> IO - speech.speak (11:47:25.598):
> Speaking [LangChangeCommand (u'en_US'), u'not checked']
> IO - inputCore.InputManager.executeGesture (11:47:26.700):
> Input: kb(laptop):space
> IO - speech._speakSpellingGen (11:47:26.716):
> Speaking character u'space'
> IO - speech.speak (11:47:26.755):
> Speaking [LangChangeCommand (u'en_US'), u'checked']
> IO - inputCore.InputManager.executeGesture (11:47:27.756):
> Input: kb(laptop):space
> IO - speech._speakSpellingGen (11:47:27.779):
> Speaking character u'space'
> IO - speech.speak (11:47:27.819):
> Speaking [LangChangeCommand (u'en_US'), u'not checked']
> IO - inputCore.InputManager.executeGesture (11:47:29.765):
> Input: kb(laptop):space
> IO - speech._speakSpellingGen (11:47:29.779):
> Speaking character u'space'
> IO - speech.speak (11:47:29.819):
> Speaking [LangChangeCommand (u'en_US'), u'checked']
> 
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub, or mute the thread.
> 

I have discovered two more situations where this problem occurs.

When using the windows onecore synthesizer, when pasting a file into a folder, it is expected that at the end of the copy, nvda will announce the name of the file in the folder.
What you might notice is that nvda does not tell you the name of the file you just pasted.
The file used in the test is very small, so the file copy window should disappear very fast to the point where nvda does not advertise it.
Finally, if you leave the option to read
Tooltips by positioning the focus with the arrows in a folder or file the tips are not read.
I did the same tests with the synthesizer nuance vocalizer exprecive and the problem did not.
The ability to speak characters was enabled in all tests.
Nvda next 14290.
Thank you very much.
I would like to report another situation where the one core synthesizer is cutting a speech:
In excel edit a cell, then press esc to return to the worksheet.
It is expected that nvda will announce the cell in focus.
What happens is that nvda announces only the name of the worksheet by cutting the cell name.

Again using next 14290 with onecore synthesizer, tests with vocaliser exprecive 1.1 acted without problems.
I am almost sure that other situations will come until the problem is verified, please inform me if the problems I have reported are already in sufficient quantity to identify the problem, my intention is to help and not to report problems already known.
Thank you.
It would be interesting to know if these delays or error occur when using Narrator with the OneCore Synth and the same voice.
The behaviors I have observed can’t be replicated with Narrator and English voices of OneCore.

My nvda with this build next 14290 with the voice onecore in portuguese brazil is with the informed behaviors.

The previous build of nvda that I tested next 14240 did not have these problems, the only problem was regarding the priority audio mode.

 

De: PratikP1 [mailto:notifications@github.com] 
Enviada em: segunda-feira, 7 de agosto de 2017 18:40
Para: nvaccess/nvda <nvda@noreply.github.com>
Cc: fernando-jose-silva <fernandoj.silva21@gmail.com>; Author <author@noreply.github.com>
Assunto: Re: [nvaccess/nvda] Nvda not announcing all the speeches when using the windows onecore synthesizer (#7473)

 

The behaviors I have observed can’t be replicated with Narrator and English voices of OneCore. 



—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <https://github.com/nvaccess/nvda/issues/7473#issuecomment-320788344> , or mute the thread <https://github.com/notifications/unsubscribe-auth/APTzMkhzHJlKGVxIkEzKcXTJtipSGpCbks5sV4QwgaJpZM4OtQJD> .  <https://github.com/notifications/beacon/APTzMqoXh07cSDKB85sQnQZ7rO18KuA4ks5sV4QwgaJpZM4OtQJD.gif> 


I did the tests with the narrator and none of the problems reported by me did.

The narrator is unfortunately much faster than the nvda.

 

De: Ethan Holliger [mailto:notifications@github.com] 
Enviada em: segunda-feira, 7 de agosto de 2017 16:39
Para: nvaccess/nvda <nvda@noreply.github.com>
Cc: fernando-jose-silva <fernandoj.silva21@gmail.com>; Author <author@noreply.github.com>
Assunto: Re: [nvaccess/nvda] Nvda not announcing all the speeches when using the windows onecore synthesizer (#7473)

 

It would be interesting to know if these delays or error occur when using Narrator with the OneCore Synth and the same voice.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <https://github.com/nvaccess/nvda/issues/7473#issuecomment-320759831> , or mute the thread <https://github.com/notifications/unsubscribe-auth/APTzMslyqb0eCY5Vy8XCnHaEeHsb8919ks5sV2fpgaJpZM4OtQJD> .  <https://github.com/notifications/beacon/APTzMoucvL7F10E1GsygzS2Sy94xBzB3ks5sV2fpgaJpZM4OtQJD.gif> 


@jcsteh, I'm mentioning you based on our Twitter conversation.
Confirmed.

Can people experiencing this please test [this earlier next snapshot](https://ci.appveyor.com/api/buildjobs/a6akei54c542rrtu/artifacts/output/nvda_snapshot_next-14254,b58ac3ff.exe) and report whether the problem occurs there? I too am pretty sure this is a regression introduced by the ducking fix (#7463) and this is the next build just before that change got merged.

Technical: I added a call to player.idle, but that can take some time and it doesn't check the queue again afterwards, so there could be pending stuff in the queue that doesn't get spoken.

Regarding Narrator being faster, in addition to the boosted rates, Narrator have access to a setting which allows them to reduce the ridiculously long delay OneCore voices insert at the end of utterances. Unfortunately, that is only possible using a private API that we can't access. Again, I'd suggest that people make Microsoft aware that they want this to be possible for NVDA, since feedback from multiple users will have more impact.
Thank you so much for you guys watching this, I was very happy.
I'm sorry, I did not understand, how many builds should I test?
I'll be with a machine with Windows 10 on Monday, I'm happy to help.
Congratulations and thank you very much for the work

Enviado do meu iPhone

> Em 12 de ago de 2017, às 22:46, James Teh <notifications@github.com> escreveu:
> 
> Confirmed.
> 
> Can people experiencing this please test this earlier next snapshot and report whether the problem occurs there? I too am pretty sure this is a regression introduced by the ducking fix (#7463) and this is the next build just before that change got merged.
> 
> Technical: I added a call to player.idle, but that can take some time and it doesn't check the queue again afterwards, so there could be pending stuff in the queue that doesn't get spoken.
> 
> Regarding Narrator being faster, in addition to the boosted rates, Narrator have access to a setting which allows them to reduce the ridiculously long delay OneCore voices insert at the end of utterances. Unfortunately, that is only possible using a private API that we can't access. Again, I'd suggest that people make Microsoft aware that they want this to be possible for NVDA, since feedback from multiple users will have more impact.
> 
> —

The bit where I mentioned a next build in my comment was a link. Follow that link to get the build I was referring to specifically.

Perfect, I saw the email on the iphone and did not notice the link.
I'm going to take the test on Monday, thank you very much.

Resolving patch:
diff --git a/source/synthDrivers/oneCore.py b/source/synthDrivers/oneCore.py
--- a/source/synthDrivers/oneCore.py
+++ b/source/synthDrivers/oneCore.py
@@ -161,7 +161,6 @@ def _processQueue(self):
 			# which will eventually process the queue again.
 			self._dll.ocSpeech_speak(self._handle, item)
 			return
-		self._player.idle()
 		log.debug("Queue empty, done processing")
 		self._isProcessing = False
 
@@ -209,6 +208,13 @@ def _callback(self, bytes, len, markers):
 			if prevMarker:
 				self.lastIndex = prevMarker
 			log.debug("Done pushing audio")
+			if not self._queuedSpeech:
+				# There are no more queued utterances at this point, so call idle.
+				# This blocks while waiting for the final chunk to play,
+				# so by the time this is done, there might be something queued.
+				# The call to _processQueue will take care of this.
+				log.debug("Calling idle on audio player")
+				self._player.idle()
 		self._processQueue()
 
 	def _getAvailableVoices(self, onlyValid=True):


Test patch: