Ask developers: Synth Driver: Async or Sync speakText


Tuan Le Anh <tuanla1972@...>
 

Hi there.
My name is Tuan Le Anh. I am developing Vietnamese TTS for NVDA.
I just wanted to ask a question but don't have permission to post in developer mail group.
So, I am sending to you with hope you will help me.
My problem is that I can't get speakText function to work properly.
If speakText is synchronized function, NVDA freezes while TTS reads some text.
If speakText is async, Say All feature doesn't work properly: system caret moves to end of text at once instead of moving along with reading text, or system caret doesn't move and NVDA reads only few lines of text (reads around 10 lines then stops).
Please, help me as blind people in Vietnam really need my portable synthesizer.
Thank you and looking forward to your replying,
Tuan Le Anh.


Tyler Spivey
 

Hi,
You can subscribe to nvda-devel here:
https://lists.sourceforge.net/lists/listinfo/nvda-devel
Or by sending mail to nvda-devel-request@lists.sourceforge.net with subscribe in the body.

speak (and thus speakText) must be async. When something calls speak (speakText is deprecated), send it off to a background thread.

For say all to work properly, you also have to handle indexes. An index is a marker that the screen reader sends to the synthesizer, and the synth sends back when it gets to that point in the output.

If you still need help, feel free to mail nvda-devel or mail me off-list. I've written a few of these.

On 10/16/2016 6:31 PM, Tuan Le Anh wrote:
Hi there.
My name is Tuan Le Anh. I am developing Vietnamese TTS for NVDA.
I just wanted to ask a question but don't have permission to post in
developer mail group.
So, I am sending to you with hope you will help me.
My problem is that I can't get speakText function to work properly.
If speakText is synchronized function, NVDA freezes while TTS reads some
text.
If speakText is async, Say All feature doesn't work properly: system
caret moves to end of text at once instead of moving along with reading
text, or system caret doesn't move and NVDA reads only few lines of text
(reads around 10 lines then stops).
Please, help me as blind people in Vietnam really need my portable
synthesizer.
Thank you and looking forward to your replying,
Tuan Le Anh.


Tuan Le Anh <tuanla1972@...>
 

Great! 

I didn't understand what is GetLastIndex used for.

Now the system caret moves correctly with my synthesizer!

Thank you very much!.




Brian's Mail list account BY <bglists@...>
 

You cannot subscribe to the development list then, or is it that you have not managed to get subscribed.

I think its best this is sorted as I'm sure there will be lots of questions like this that will need asking.

You could also ask on the add-ons list as well, or pose it as a possible extension using git hub.
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: "Tuan Le Anh" <tuanla1972@gmail.com>
To: <nvda@nvda.groups.io>
Sent: Monday, October 17, 2016 2:31 AM
Subject: [nvda] Ask developers: Synth Driver: Async or Sync speakText


Hi there.
My name is Tuan Le Anh. I am developing Vietnamese TTS for NVDA.
I just wanted to ask a question but don't have permission to post in developer mail group.
So, I am sending to you with hope you will help me.
My problem is that I can't get speakText function to work properly.
If speakText is synchronized function, NVDA freezes while TTS reads some text.
If speakText is async, Say All feature doesn't work properly: system caret moves to end of text at once instead of moving along with reading text, or system caret doesn't move and NVDA reads only few lines of text (reads around 10 lines then stops).
Please, help me as blind people in Vietnam really need my portable synthesizer.
Thank you and looking forward to your replying,
Tuan Le Anh.