Re: Empirically setting a screen reader delay

2019-09-11 Thread AudioGames . net Forum — Developers room : jack via Audiogames-reflector


  


Re: Empirically setting a screen reader delay

Not necessarily. Particularly with the missiles radar, the direction you are in relation to a fighter/aircraft carrier or the like, and all that important stuff. There's too much noise going on for the screen reader to be legible under that setup. Thus, the game is set to lower its volume when going into hud mode. If the screen reader were to speak the information without allowing the game to enter that state, it would either:1. Enter the state anyway for the sake of allowing users to hear the information clearly, but then not know when to raise the volume again, or2. Not affect the volume, thus not allowing the player to hear clearly.

URL: https://forum.audiogames.net/post/461249/#p461249




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Empirically setting a screen reader delay

2019-09-09 Thread AudioGames . net Forum — Developers room : nidza07 via Audiogames-reflector


  


Re: Empirically setting a screen reader delay

I wonder though, do you really need to pause the game to provide a status update? Haven't played TDV in a long time so sorry if this is obvious, but can't you just announce it and let the game go on? It's only a few seconds of speech at most.

URL: https://forum.audiogames.net/post/460744/#p460744




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Empirically setting a screen reader delay

2019-09-09 Thread AudioGames . net Forum — Developers room : Munawar via Audiogames-reflector


  


Re: Empirically setting a screen reader delay

Ok. That definitely won't work for something like TDV. The user experience will be greatly disrupted if the player was asked to press ENTER after every status message.

URL: https://forum.audiogames.net/post/460733/#p460733




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Empirically setting a screen reader delay

2019-09-09 Thread AudioGames . net Forum — Developers room : nidza07 via Audiogames-reflector


  


Re: Empirically setting a screen reader delay

The Manamon solution is one of the things I mentioned above, press enter once your screen reader is done speaking to continue.

URL: https://forum.audiogames.net/post/460701/#p460701




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Empirically setting a screen reader delay

2019-09-09 Thread AudioGames . net Forum — Developers room : bgt lover via Audiogames-reflector


  


Re: Empirically setting a screen reader delay

I think that, instead of using some dirty tricks to see whether the screen reader finished speaking, better use some more reliable way to output speech, such as sapi(windows) or speech dispatcher(linux), which can determine quite easily if the voice stopped speaking.There aren't so many people that see screen reader interaction in audiogames is a must have and it's not as sapi wouldn't represent a form of speech, so I consider safe to use sapi for any speech related game stuff.I believe there are some people that play or played entombed? For those who didn't, it has screen reader support, but it tryes to use the same method of detecting if it finished speaking discussed above(words per minute counting). Results? let'ssay that the gameplay is... hmm... not plesent.However, if you feel like you need screen readers in your game, the manamon solution is the best there is.

URL: https://forum.audiogames.net/post/460650/#p460650




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Empirically setting a screen reader delay

2019-09-09 Thread AudioGames . net Forum — Developers room : Munawar via Audiogames-reflector


  


Re: Empirically setting a screen reader delay

@Rastislav Kiss: Thanks for this information; it's very helpful! You're correct that we'd have to run some reliable tests to really see how fool-proof this method is.bgt lover wrote:However, if you feel like you need screen readers in your game, the manamon solution is the best there is.What exactly is the Manamon solution? Some elaboration would be helpful here.As for confining the player to SAPI, I prefer to give my players choices: you can either use your completely customized voice, or use SAPI. The choice should always be left up to the player and not restricted by the game. For example, I hate it when games insist on outputting through SAPI, no matter how natural-sounding SAPI voices have become. I'm used to Eloquence and love Eloquence and my screen-reader has a highly customized voice in accordance with my slight hearing impairment. So I would much prefer the game to let me use my screen-reader. If it's to use SAPI, it might as well be self-voiced at that point. Certainly a pure SAPI solution would solve all these problems since their API is strong and offers native functionality for the things discussed in this thread, and if the player does choose to use SAPI I do fall back to the SAPI-provided functions, but "just use SAPI" isn't the solution I'm looking for here.

URL: https://forum.audiogames.net/post/460653/#p460653




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Empirically setting a screen reader delay

2019-09-09 Thread AudioGames . net Forum — Developers room : Munawar via Audiogames-reflector


  


Re: Empirically setting a screen reader delay

bgt lover wrote:However, if you feel like you need screen readers in your game, the manamon solution is the best there is.What exactly is the Manamon solution? Some elaboration would be helpful here.As for confining the player to SAPI, I prefer to give my players choices: you can either use your completely customized voice, or use SAPI. The choice should always be left up to the player and not restricted by the game. For example, I hate it when games insist on outputting through SAPI, no matter how natural-sounding SAPI voices have become. I'm used to Eloquence and love Eloquence and my screen-reader has a highly customized voice in accordance with my slight hearing impairment. So I would much prefer the game to let me use my screen-reader. If it's to use SAPI, it might as well be self-voiced at that point. Certainly a pure SAPI solution would solve all these problems since their API is strong and offers native functionality for the things discussed in this thread, and if the player does choose to use SAPI I do fall back to the SAPI-provided functions, but "just use SAPI" isn't the solution I'm looking for here.

URL: https://forum.audiogames.net/post/460653/#p460653




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Empirically setting a screen reader delay

2019-09-09 Thread AudioGames . net Forum — Developers room : bgt lover via Audiogames-reflector


  


Re: Empirically setting a screen reader delay

I think that, instead of using some dirty tricks to see whether the screen reader finished speaking, better use some more reliable way to output speech, such as sapi(windows) or speech dispatcher(linux), which can determine quite easily if the voice stopped speaking.There aren't so many people that see screen reader interaction in audiogames is a must have and it's not as sapi wouldn't represent a form of speech, so I consider safe to use sapi for any speech related game stuff.I believe there are some people that play or played entombed? For those who didn't, it has screen reader support, but it tryes to use the same method of detecting if it finished speaking discussed above(wpm count). Results? let'ssay that the gameplay is... hmm... not plesent.However, if you feel like you need screen readers in your game, the manamon solution is the best there is.

URL: https://forum.audiogames.net/post/460650/#p460650




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Empirically setting a screen reader delay

2019-09-09 Thread AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector


  


Re: Empirically setting a screen reader delay

Hi,Munawar is right. The algorithm is expected to run in its own method, as I have stated above it, I haven't wrote it explicitly as I didn't consider it important.It is thus synchronous and thread safe.Regarding 10 ms check, I have made a simple experiment. P is one of the shortest phonemes, as it is very easy to produce. You make it just by forming your lips and blowing air through, what is easier than vibrating your vocal cords, like in other phonemes. of course you can do the same even in case of p, but the primary clicking sound is made by the air interrupt.So I set my tts voice to 100% and generated pp. Pp to get pronounciation as in phonemes, if I made just p alone, my synthesizer would pronounce it as p consonant, which has added some unwanted stuff like when you say pea to say p in english.Result? 559 ms long file. i have get this and removed all silences in Goldwave for case that balabolka or synthetizer itself added some silence to it.Result was 86 ms long. now when we divide this by two, because there are actually two p, we get 43 ms for each p.That's still more than 4 times longer from our 10 ms check.Thus I personally wouldn't be so worried about short sounds, I think the algorithm could eliminate them quite well.But the best prove is always actual experience, so it would be probably most convincing writing actual Speech waiter and trying it in practice.Best regardsRastislav

URL: https://forum.audiogames.net/post/460633/#p460633




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Empirically setting a screen reader delay

2019-09-09 Thread AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector


  


Re: Empirically setting a screen reader delay

Hi,Munawar is right. The algorithm is expected to run in its own method, as I have stated above it, I haven't wrote it explicitly as I didn't consider it important.It is thus synchronous and thread safe.Regarding 10 ms check, I have made a simple experiment. P is one of the shortest phonemes, as it is very easy to produce. You make it just by forming your lips and blowing air through, what is easier than vibrating your vocal cords, like in other phonemes. of course you can do the same even in case of p, but the primary clicking sound is made by the air interrupt.So I set my tts voice to 100% and generated pp. Pp to get pronounciation as in phonemes, if I made just p alone, my synthesizer would pronounce it as p consonant, which has added some unwanted stuff like when you say pea to say p in english.Result? 559 ms long file. i have get this and removed all silences in Goldwave for case that balabolka or synthetizer itself added some silence to it.Result was 89 ms long. now when we divide this by two, because there are actually two p, we get 44,5 ms for each p.That's still more than 4 times longer from our 10 ms check.Thus I personally wouldn't be so worried about short sounds, I think the algorithm could eliminate them quite well.But the best prove is always actual experience, so it would be probably most convincing writing actual Speech waiter and trying it in practice.Best regardsRastislav

URL: https://forum.audiogames.net/post/460633/#p460633




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Empirically setting a screen reader delay

2019-09-08 Thread AudioGames . net Forum — Developers room : Munawar via Audiogames-reflector


  


Re: Empirically setting a screen reader delay

@Ethin: he doesn't need a mutex on counter. I'm assuming that code is its own function in which case there is no sharing of state there. You don't need to make counter reside in global scope for this. So the code is thread-safe.As for the first point you mentioned, he can wait on a notify event that will block the thread until the screen-reader starts speaking. So the function can provide a guarantee that once the code enters the loop, the screen-reader has definitely started speaking so there's no race condition to contend with.My original point still stands though: that of timing. Even with 10 ms delay, it's theoretically still possible to incorrectly state that the screen-reader has finished speaking. Any type of delay-check-delay-check pattern on periodic data runs this type of risk, and vocals are definitely periodic data.

URL: https://forum.audiogames.net/post/460581/#p460581




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Empirically setting a screen reader delay

2019-09-08 Thread AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector


  


Re: Empirically setting a screen reader delay

There's still a race condition in there. Since you can't synchronize that looping thread and the screen reader reliably, this situation is very possible:1. Thread runs: screen reader is not speaking. Waits 10 MS.2. Thread runs 10 MS later. Just as thread checks peek, screen reader starts speaking just as the peek function returns.3. Thread receives incorrect peek and increments counter.Also, your above algorithm is not written idiomatically. It would be better to write:int counter=0;
while (counter <= 50) {
if (GetScreenreaderPeak()==0.0) {
counter++;
} else if (counter!=0) {
counter=0;
}
Thread.Sleep(10);
}And reading over the algorithm, I just noticed a possible infinite loop. Its a good idea in theory, this algorithm, but it undoubtedly will not work (neither the infinite loop idea or the idiomatic approach). The reason is your timing -- your waiting 10 ms between checks. Your condition, if counter != 0 counter = 0, is going to occur far more often than your counter increment code. (It would also be hard to apply this algorithm, not just because its not thread-safe, but because you currently have no way of determining if its safe to proceed and speak. Even locking the counter with a mutex/RWLock is insufficient to solve the second problem. If you check the counter, your speaking will be incredibly sporadic; if you check if the thread is running there's a higher chance the speaking will never occur than it actually occurring.)

URL: https://forum.audiogames.net/post/460541/#p460541




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Empirically setting a screen reader delay

2019-09-08 Thread AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector


  


Re: Empirically setting a screen reader delay

@20: regarding the peak tracking algorithm, I would myself take different approach. Not because of half second long words, I don't think something like that could happen, although it is possible in theory.But rather because 500 ms is very long time, and if your first stop is in half of its value, then secondone will be 750 ms from speech's end, and will jump in these values.Thus to prevent that long pauses, I would do a single WaitForSpeechFinish method, which algorithm would be as follows:int counter=0;
while (true)
{
if (GetScreenreaderPeak()==0.0)
counter++;
else if (counter!=0)
counter=0;

if (counter==50)
return;

Thread.Sleep(10);
}This should solve all problems discussed above, long pauses as well as short words between checks.Best regardsRastislav

URL: https://forum.audiogames.net/post/460531/#p460531




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Empirically setting a screen reader delay

2019-09-08 Thread AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector


  


Re: Empirically setting a screen reader delay

@20: regarding the peak tracking algorithm, I would myself take different approach. Not because of half second long words, I don't think something like that could happen, although it is possible in theory.But rather because 500 ms is very long time, and if your first stop is in half of its value, then secondone will be 750 ms from speech's end, and will jump in these values.Thus to prevent that long pauses, I would do a single WaitForSpeechFinish method, which algorithm would be as follows:int counter=0;while (true){if (GetScreenreaderPeak()==0.0)counter++;else if (counter!=0)counter=0;if (counter==50)return;Thread.Sleep(10);}This should solve all problems discussed above, long pauses as well as short words between checks.Best regardsRastislav

URL: https://forum.audiogames.net/post/460531/#p460531




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Empirically setting a screen reader delay

2019-09-08 Thread AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector


  


Re: Empirically setting a screen reader delay

@20: regarding the peak tracking algorithm, I would myself take different approach. Not because of half second long words, I don't think something like that could happen, although it is possible in theory.But rather because 500 ms is very long time, and if your first stop is in half of its value, then secondone will be 750 ms from speech's end, and will jump in these values.Thus to prevent that long pauses, I would do a single WaitForSpeechFinish method, which algorithm would be as follows:int counter=0;while (true){if (GetScreenreaderPeak()==0.0)counter++;else if (counter!=0)counter=0;if (counter==50)return;Thread.Sleep(10);}This should prevent all problems discussed above, long pauses as well as short words.Best regardsRastislav

URL: https://forum.audiogames.net/post/460531/#p460531




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Empirically setting a screen reader delay

2019-09-08 Thread AudioGames . net Forum — Developers room : Munawar via Audiogames-reflector


  


Re: Empirically setting a screen reader delay

Thanks everyone for your suggestions. It seems like some of you have gotten it to work reliably for determining if a screen reader is speaking, though I'm getting pretty accurate timings with the solution I've currently got, especially once I wrote a function to convert numbers to words which was the biggest problem I was facing since one number like 1600 counts as one word unless it's explicitly converted into words. Of course now the issue is localization since I'm only accounting for English number to word conversions. Any ideas on this part? I've been unable to find a C# number to word conversion library and don't want to bother with writing my own complex localization code if there's a library out there that already does this.The main reason I don't think I'll be using snvol is because of the purposeful delay to check if the screen-reader is still speaking. It smells of race conditions as in this example:1. Check the volume.2. If it's 0, assume the screen-reader has just paused and wait 500 MS.3. If the volume is above 0, go to step 1.4. If not, the screen-reader is finished speaking.Assume here that after your 500 MS delay you happen to check the volume while the screen-reader has taken another pause. You will incorrectly determine that the screen-reader is finished speaking.

URL: https://forum.audiogames.net/post/460528/#p460528




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Empirically setting a screen reader delay

2019-09-08 Thread AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector


  


Re: Empirically setting a screen reader delay

@18: I have adressed that problem in the pause between sentences section, it should work quite reliably.It's not very surprising as recognizing by the audio's peak is the same what we humans do to determine if screenreader has finished its session or not, so if the peak information is available, there is no reason why it couldn't be done by computer.Of course as I stated before direct support from screenreader's side is the best option you can have, however when this is not available and can't be added for example due to closed source code, I personally consider tracking audio session peak much more reliable than relying on a statistical words per minute calculation.Best regardsRastislav

URL: https://forum.audiogames.net/post/460527/#p460527




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Empirically setting a screen reader delay

2019-09-08 Thread AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector


  


Re: Empirically setting a screen reader delay

@18: I have adressed that problem in the pause between sentences section, it should work quite reliably.It's not surprising as recognizing by the audio's peak is the same what we humans do to determine if screenreader has finished its session or not, so if the peak information is available, there is no reason why it shouldn't be done by computer.Of course as I stated before direct support from screenreader's side is the best option you can have, however when this is not available and can't be added for example due to closed source code, I personally consider tracking audio session peak much more reliable than relying on a statistical words per minute calculation.Best regardsRastislav

URL: https://forum.audiogames.net/post/460527/#p460527




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Empirically setting a screen reader delay

2019-09-08 Thread AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector


  


Re: Empirically setting a screen reader delay

No, 10, fir my first question I meant that if the peek volume is zero, you cannot reliably determine whether audio is done streaming. Just because a peek may be at zero at one time does not mean that audio isn't still being streamed. Silence is audio, you know, and that has a peek of zero. I do not consider that a reliable solution.

URL: https://forum.audiogames.net/post/460488/#p460488




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Empirically setting a screen reader delay

2019-09-08 Thread AudioGames . net Forum — Developers room : Hijacker via Audiogames-reflector


  


Re: Empirically setting a screen reader delay

Although done speaking doesn't inform you when the synth started speaking again. But i'm pretty sure that those events can be handled and requested from within NVDA and thus be added to its api as well.Best Regards.Hijacker

URL: https://forum.audiogames.net/post/460479/#p460479




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Empirically setting a screen reader delay

2019-09-08 Thread AudioGames . net Forum — Developers room : Kyleman123 via Audiogames-reflector


  


Re: Empirically setting a screen reader delay

from the NVDA 2019.3 alpha changelog... SynthDriver classes must now notify the synthDriverHandler.synthDoneSpeaking action, once all audio from a SynthDriver.speak call has completed playing.so its in the works.

URL: https://forum.audiogames.net/post/460471/#p460471




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Empirically setting a screen reader delay

2019-09-08 Thread AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector


  


Re: Empirically setting a screen reader delay

Hi,@11 & 12: yup, however those are not actual volume sliders but expected volume sliders. You can use them to set how loud should each program be, but they don't show current volume.For showing current volume, there are green bars increasing or decreasing due to current program's peak and those are not accessible. Or that is at least what i guess from the stack overflow link I posted in my first post here, I haven't asked if they are really there, but it would make sense.@13: the reason why I didn't want to mention sndvol at first was exactly to prevent people confusing mixer's volume sliders with the concrete peaks of audio sessions.When I run program which's source code have I posted in my first post, and turn off screenreader's speech (just speech, not entire screenreader), I get about five zeros at the output, because nothing is actually playing, while in the mixer values are all about 20%, so these are not the same.When I keep the screenreader running, after press of the enter key it's still babbling, what causes the first value to be somewhere about 0.2 or 0.4, while the rest stays at zeroes, because no other program is currently playing.Thus, based on the value, you can tell quite reliably if screenreader is speaking or not, I have tried few times and it worked without mistakes.Just be careful about speech pauses, however I think I have mentioned that already. Regarding Windows xp, I don't know, I have a feeling that I saw some audiosessioning software for it, but have no idea if it's just a ghost in my memory and if not how have it worked then.Anyway, I wouldn't bother about it too much myself, i think minimal amount of people is using xp today. Even the most conservativeones are at least at Win 7, and even big companies have excluded this system version from their support such as Google, Mozilla, Microsoft, Dropbox etc.Best regardsRastislav

URL: https://forum.audiogames.net/post/460470/#p460470




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Empirically setting a screen reader delay

2019-09-08 Thread AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector


  


Re: Empirically setting a screen reader delay

Hi,@11 & 12: yup, however those are not actual volume sliders but expected volume sliders. You can use them to set how loud should each program be, but they don't show current volume.For showing current volume, there are green bars increasing or decreasing due to current program's peak and those are not accessible. Or that is at least what i guess from the stack overflow link I posted in my first post here, I haven't asked if they are really there, but it would make sense.@13: the reason why I didn't want to mention sndvol at first was exactly to prevent people confusing mixer's volume sliders with the concrete peaks of audio sessions.When I run program which's source code have I posted in my first post, and turn off screenreader's speech (just speech, not entire screenreader), I get about five zeros at the output, because nothing is actually playing, while in the mixer values are all about 20%, so these are not the same.When I keep the screenreader running, after press of the enter key it's still babbling, what causes the first value to be somewhere about 0.2 or 0.4, while the rest stays at zeroes, because no other program is currently playing.Thus, based on the value, you can tell quite reliably if screenreader is speaking or not, I have tried few times and it worked without mistakes.Just be careful about speech pauses, however I think I have mentioned that already. Regarding Windows xp, I don't know, I have a feeling that I saw some audiosessioning software for it, but have no idea if it's just a ghost in my memory and if not how have it worked then.Anyway, I wouldn't bother about it too much myself, i think minimal amount of people is using xp today. Even the most conservativeones are at least at Win 7, and even big companies have released this system version from their support such as Google, Mozilla, Microsoft, Dropbox etc.Best regardsRastislav

URL: https://forum.audiogames.net/post/460470/#p460470




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Empirically setting a screen reader delay

2019-09-08 Thread AudioGames . net Forum — Developers room : Hijacker via Audiogames-reflector


  


Re: Empirically setting a screen reader delay

It just shows the volume output, no matter if its actually outputting something or not.Regarding Windows XP and stuff, you shouldn't bother caring about that too much. XP is long gone now and we as developers shouldn't hang around with outdated solutions for too long, hence we can XP out of the calculation here.Best Regards.Hijacker

URL: https://forum.audiogames.net/post/460455/#p460455




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Empirically setting a screen reader delay

2019-09-08 Thread AudioGames . net Forum — Developers room : Munawar via Audiogames-reflector


  


Re: Empirically setting a screen reader delay

Ok. I see now what this program does. How would you go from here (just getting volume) to determining if the screen reader is speaking? Do the volume levels change when something is streaming? After a quick glance it seems like it's only a volume control API.Finally, would this work on systems that don't support separate volumes, like XP? I think the independent volume control option has been available since Windows 7.

URL: https://forum.audiogames.net/post/460447/#p460447




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Empirically setting a screen reader delay

2019-09-08 Thread AudioGames . net Forum — Developers room : Hijacker via Audiogames-reflector


  


Re: Empirically setting a screen reader delay

Same here, using sndvol for years now and it works perfectly fine.Best Regards.Hijacker

URL: https://forum.audiogames.net/post/460431/#p460431




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Empirically setting a screen reader delay

2019-09-08 Thread AudioGames . net Forum — Developers room : KG4RDF via Audiogames-reflector


  


Re: Empirically setting a screen reader delay

@10I just opened Sndvol and can see each program I have open as well as the associated volume level by just tabbing through the window. NVDA says "dialog" before the program name, but that's it. Perfectly accessible.

URL: https://forum.audiogames.net/post/460425/#p460425




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Empirically setting a screen reader delay

2019-09-08 Thread AudioGames . net Forum — Developers room : KG4RDF via Audiogames-reflector


  


Re: Empirically setting a screen reader delay

@10I just opened Sndvol and can see each program I have open as well as the associated volume letter by just tabbing through the window. NVDA says "dialog" before the program name, but that's it. Perfectly accessible.

URL: https://forum.audiogames.net/post/460425/#p460425




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Empirically setting a screen reader delay

2019-09-08 Thread AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector


  


Re: Empirically setting a screen reader delay

@8:1. Do you mean when for example user lowered volume of the system to zero, so this would be as well while screenreader could be potentially speaking?Well, what would be then the point to wait for screenreader to end its speech, when user can't hear it?There is of course still an option to track the set volume level and get prepared for the zero case, but I personally don't see the point in it.2. Yes, you can get name of each session. Just launch sndvol on your computer and you can see, that it finds all of them and show them along with their names and current volume, which is fortunately not accessible. Looking for common screenreader names, we shouldn't have problems finding what we want.@9: Why just when no other sounds're playing? This approach tracks peak just of one application, not whole system, so I don't see the reason why it shouldn't work when other programs play something.Of course what I provided as a code sample is not the concrete screenreader solution, it's just an utility which displays current peaks of all applications using the soundcard, because this functionality is not accessible in sndvol.Best regardsRastislav

URL: https://forum.audiogames.net/post/460413/#p460413




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Empirically setting a screen reader delay

2019-09-08 Thread AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector


  


Re: Empirically setting a screen reader delay

@8:1. Do you mean when for example user lowered volume of the system to zero, so this would be as well while screenreader could be potentially speaking?Well, what would be then the point to wait for screenreader to end its speech, when user can't hear it?There is of course still an option to track the set volume level and get prepared for the zero case, but I personally doesn't see the point in it.2. Yes, you can get name of each session. Just launch sndvol on your computer and you can see, that it finds all of them and show them along with their names and current volume, which is fortunately not accessible. Looking for common screenreader names, we shouldn't have problems finding what we want.@9: Why just when no other sounds're playing? This approach tracks peak just of one application, not whole system, so I don't see the reason why it shouldn't work when other programs play something.Of course what I provided as a code sample is not the concrete screenreader solution, it's just an utility which displays current peaks of all applications using the soundcard, because this functionality is not accessible in sndvol.Best regardsRastislav

URL: https://forum.audiogames.net/post/460413/#p460413




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Empirically setting a screen reader delay

2019-09-08 Thread AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector


  


Re: Empirically setting a screen reader delay

@8:1. Do you mean when for example user lowered volume of the system to zero, so this would be as well while screenreader could be potentially speaking?Well, what would be then the point to wait for screenreader to end its speech, when user can't hear it?There is of course still an option to track the set volume level and get prepared for the zero case, but I personally doesn't see point in it.2. Yes, you can get name of each session. Just launch sndvol on your computer and you can see, that it finds all of them and show them along with their names and current volume, which is fortunately not accessible.Looking for common screenreader names, we shouldn't have problems finding what we want.@9: Why just when no other sounds're playing? This approach tracks peak just of one application, not whole system, so I don't see the reason why it shouldn't work when other programs play something.Of course what I provided as a code sample is not the concrete screenreader solution, it's just an utility which displays current peaks of all applications using the soundcard, because this functionality is not accessible in sndvol.Best regardsRastislav

URL: https://forum.audiogames.net/post/460413/#p460413




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Empirically setting a screen reader delay

2019-09-08 Thread AudioGames . net Forum — Developers room : Munawar via Audiogames-reflector


  


Re: Empirically setting a screen reader delay

@7: Thanks for this code, though as @8 mentioned, this would only work if no other sounds were playing.To achieve the words-per-minute count, I do exactly what Lone Wolf did:1. Have the screen reader speak something.2. The user presses ENTER after the screen reader is done.3. Measure this time.System.Diagnostics.Stopwatch w = System.Diagnostics.Stopwatch.StartNew();
String testString = "I really have nothing interesting to put here not even the secret to life except this really long run on sentence that is probably the most boring thing you have ever read but that will help me get an idea of how fast your screen reader is speaking.";
float wordCount = testString.Split().Length; // Use float here so we don't unintentionally perform int division below.
Common.GenerateMenu(testString, new string[] { "Ok" });
SapiSpeech.screenReaderRate = w.ElapsedMilliseconds / wordCount;The screenReaderRate field now contains the number of ms to speak one word. So when we want to delay the speech, it's simply a matter of determining how many words are in the string and multiplying it by screenReaderRate.private static void startSpeakTimerOn(String text)
{
timeRequiredToSpeak = (long)(text.Split(' ').Length * screenReaderRate);
watch.Reset();
watch.Start();
}Now the API can just wait until the elapsed time on the stopwatch exceeds the required time.Of course there's also code here to break the wait loop when the user presses a key and all that, but I've left it out for the sake of brevity.public static bool isSpeaking()
{
if (watch.IsRunning)
return watch.ElapsedMilliseconds < timeRequiredToSpeak;
return voice != null && voice.State == SynthesizerState.Speaking;
}

URL: https://forum.audiogames.net/post/460387/#p460387




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Empirically setting a screen reader delay

2019-09-08 Thread AudioGames . net Forum — Developers room : Munawar via Audiogames-reflector


  


Re: Empirically setting a screen reader delay

@7: Thanks for this code, though as @8 mentioned, this would only work if no other sounds were playing.To achieve the words-per-minute count, I do exactly what Lone Wolf did:1. Have the screen reader speak something.2. The user presses ENTER after the screen reader is done.3. Measure this time.System.Diagnostics.Stopwatch w = System.Diagnostics.Stopwatch.StartNew();
String testString = "I really have nothing interesting to put here not even the secret to life except this really long run on sentence that is probably the most boring thing you have ever read but that will help me get an idea of how fast your screen reader is speaking.";
float wordCount = testString.Split().Length; // Use float here so we don't unintentionally perform int division below.
Common.GenerateMenu(testString, new string[] { "Ok" });
SapiSpeech.screenReaderRate = w.ElapsedMilliseconds / wordCount;The screenReaderRate field now contains the number of ms to speak one word. So when we want to delay the speech, it's simply a matter of determining how many words are in the string and multiplying it by screenReaderRate.private static void startSpeakTimerOn(String text)
{
timeRequiredToSpeak = (long)(text.Split(' ').Length * screenReaderRate);
watch.Reset();
watch.Start();
}Now the API can just wait until the elapsed time on the stopwatch exceeds the required time.Of course there's also code here to break the wait loop when the user presses a key and all that, but I've left it out for the sake of brevity.

URL: https://forum.audiogames.net/post/460387/#p460387




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Empirically setting a screen reader delay

2019-09-08 Thread AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector


  


Re: Empirically setting a screen reader delay

Two issues I see with this approach:1) It appears like that only gets volume output for each application and does not indicate whether audio is being streamed or not. Even if the peek is zero, audio can still be being streamed.2) How would you be able to tell what's a screen reader and what isn't? Can you get session names?I think that NVAccesses method would be far more accurate than this method; we would then not need to second-guess ourselves on whether audio data is still being streamed to the audio device through that session or not.

URL: https://forum.audiogames.net/post/460365/#p460365




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Empirically setting a screen reader delay

2019-09-07 Thread AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector


  


Re: Empirically setting a screen reader delay

Hi there,I haven't tried it directly as I didn't really need this functionality yet, but wouldn't it be possible to just hook into screenreader's audio output and track if something is going on or not?Or more technically, track its audio session and determine whether it speaks or not using its peak?It looks quite easy:https://stackoverflow.com/questions/212 … d/21202235If you want to try it out, here is my rewrite for current CSCore version, which I made just to see if it's possible or not:using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;

using CSCore;
using CSCore.CoreAudioAPI;

namespace Test {
class Program {

static void Main(string[] args)
{
using (var enumerator = new MMDeviceEnumerator())
using (var device = enumerator.GetDefaultAudioEndpoint(DataFlow.Render, Role.Multimedia))
using (var sessionManager = AudioSessionManager2.FromMMDevice(device))
{
using (var sessionEnumerator = sessionManager.GetSessionEnumerator())
{
foreach (var session in sessionEnumerator)
{
using (var audioMeterInformation = session.QueryInterface())
{
Console.WriteLine(audioMeterInformation.GetPeakValue());
}
}
}
}
}
}
}Only thing to be careful about are delays between sentences, if you check screenreader's activity during them, it would look like speech is ended, I would thus make the function wait for about half a second if there really isn't anything being spoken at the time.But otherwise it should work, much better than making courageous presumption based on words per minute btw how do you calculate that anyway?As far as I know, nvdacontroller library does not provide an audiostream of spoken text, so the user must press a key when the speech is finished?Umm... May be I am too pessimistic, but it seems to me like too hard task for an average user. Tracking screenreader's peak is universal, works with  great accuracy, also if user interrupts it, and you can even make use of fact that it waits for 500 ms by calling it in a loop, what will free you from catching asynchronous events or Sleeping thread yourself.Of course implementing directly to the screenreader is still the best approach, however when it's not possible, I would try this as the next alternative.Best regardsRastislav

URL: https://forum.audiogames.net/post/460314/#p460314




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Empirically setting a screen reader delay

2019-09-07 Thread AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector


  


Re: Empirically setting a screen reader delay

Hi there,I haven't tried it directly as I didn't really need this functionality yet, but wouldn't it be possible to just hook into screenreader's audio output and track if something is going on or not?Or more technically, track its audio session and determine whether it speaks or not using its peak?It looks quite easy:https://stackoverflow.com/questions/212 … d/21202235if you want to try it out, here is my rewrite for current CSCore version, which I made just to see if it's possible or not:using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;

using CSCore;
using CSCore.CoreAudioAPI;

namespace Test {
class Program {

static void Main(string[] args)
{
using (var enumerator = new MMDeviceEnumerator())
using (var device = enumerator.GetDefaultAudioEndpoint(DataFlow.Render, Role.Multimedia))
using (var sessionManager = AudioSessionManager2.FromMMDevice(device))
{
using (var sessionEnumerator = sessionManager.GetSessionEnumerator())
{
foreach (var session in sessionEnumerator)
{
using (var audioMeterInformation = session.QueryInterface())
{
Console.WriteLine(audioMeterInformation.GetPeakValue());
}
}
}
}
}
}
}Only thing to be careful about are delays between sentences, if you check screenreader's activity during them, it would look like speech is ended, I would thus make the function wait for about half a second if there really isn't anything being spoken at the time.But otherwise it should work, much better than making courageous presumption based on words per minute btw how do you calculate that anyway?As far as I know, nvdacontroller library does not provide an audiostream of spoken text, so the user must press a key when the speech is finished?Umm... May be I am too pessimistic, but it seems to me like too hard task for an average user. Tracking screenreader's peak is universal, works with  great accuracy, also if user interrupts it, and you can even make use of fact that it waits for 500 ms by calling it in a loop, what will free you from catching asynchronous events or Sleeping thread yourself.Of course implementing directly to the screenreader is still the best approach, however when it's not possible, I would try this as the next alternative.Best regardsRastislav

URL: https://forum.audiogames.net/post/460314/#p460314




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Empirically setting a screen reader delay

2019-09-07 Thread AudioGames . net Forum — Developers room : nidza07 via Audiogames-reflector


  


Re: Empirically setting a screen reader delay

If you mean addons, then they wont load since they will be Python 3 incompatible anyways. If you mean something like Sapi synths, then that will be handled by NVDA's sapi driver.

URL: https://forum.audiogames.net/post/460254/#p460254




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Empirically setting a screen reader delay

2019-09-07 Thread AudioGames . net Forum — Developers room : Munawar via Audiogames-reflector


  


Re: Empirically setting a screen reader delay

It'll be interesting to see how synthesizers not sanctioned through official channels support this since we can't guarantee any kind of regular updates from this type of software.

URL: https://forum.audiogames.net/post/460253/#p460253




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Empirically setting a screen reader delay

2019-09-07 Thread AudioGames . net Forum — Developers room : Hijacker via Audiogames-reflector


  


Re: Empirically setting a screen reader delay

As soon as the support in the NVDA codebase is there, adding the corresponding function to the NVDA dlls should be a matter of 10 minutes and submitting a pull request, which will be very likely to be accepted.Best Regards.Hijacker

URL: https://forum.audiogames.net/post/460214/#p460214




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Empirically setting a screen reader delay

2019-09-07 Thread AudioGames . net Forum — Developers room : Munawar via Audiogames-reflector


  


Re: Empirically setting a screen reader delay

Awesome, thanks for the input. No, the NVDA dlls don't provide this functionality (it doesn't look like they've been updated for about ten years.) So hopefully this functionality will be merged into the dlls soon.

URL: https://forum.audiogames.net/post/460187/#p460187




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Empirically setting a screen reader delay

2019-09-06 Thread AudioGames . net Forum — Developers room : nidza07 via Audiogames-reflector


  


Re: Empirically setting a screen reader delay

Actually, in alpha, NVDA already requires speech synthesizers to notify when they are done speaking. I don't know if the code is in the API as well, but if not, I'd guess it is definitely a planned feature together with the speech refactor. You already follow GitHub so will probably find this easy enough, if not let me know and I can look for the appropriate pull request. In regards to the original topic, yes, as you said this is not ideal, but it works and probably the majority of your users wont mind a small delay. Some games also require you to just press enter once your screen reader is done speaking, but the delay is usually a smoother option.

URL: https://forum.audiogames.net/post/460075/#p460075




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Empirically setting a screen reader delay

2019-09-06 Thread AudioGames . net Forum — Developers room : Munawar via Audiogames-reflector


  


Empirically setting a screen reader delay

Some screen-reader APIs, like NVDA, provide no way to tell when the screen-reader has finished speaking. I finally sat down and thought about this with regards to TDV and screen-reader support: how can we provide a halt mechanism for these screen-readers? My mind went back to Lone Wolf from GMA which was probably the first game to ever achieve a "speech delay" as they called it: they would have the screen-reader speak a piece of text, and based on how long it would take, they could then make an educated guess as to the words-per-minute count.I've taken this approach in TDV (code which I haven't pushed yet, but will soon for anyone who would like to look at it.)While this method works rather well (surprisingly well, in fact,) it does have its flaws. For example, since it's based on empirical data, if the user changes their speech rate, the test has to be run again.Also, this method isn't 100% reliable: sometimes the game pauses too long, sometimes not enough. These variations are based on pauses in the screen-reader's speech and, although minimal with respect to the amount of error, still make the game feel like it can be refined a bit.Has anyone else had experience with setting speech delays? Or is that unless NVAccess themselves decide to write an isSpeaking function, this is the best way to estimate a pause time for NVDA?

URL: https://forum.audiogames.net/post/460068/#p460068




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector