2017-12-15 07:16:55

Hi all,

I am still coding the your_adventure audiogame. and with previous releases, of alpha's and the first beta and a rough beta on the 1st of january this year, i got suggestions to include screenreaders. Now i discovered how i can get nvda speaking the stuff. and i amalso thinking to make the game fully speak with nvda, and getting the sapi speech out. Cause nvda is free, and i suppose everyone likes a more quick gameplay. allthough i am almostcontent with my first tests in the main menu of the game.

Almost? yes, cause when i hit the "view the credits" option in the main menu for example, i don't even get half of the information the game provided withsapi, nvda speaks a few words and returns to the main menu.

the same when i create a new game. nvda speaks the title of the input_box that pops up and the title provided with the show_game_window function. i don't mind that actually, cause for this part all required info is given, but don't know if others will.but my main problem is that at step 2 of character creation, sapi mentioned that the system will generate an age between 18 and 25. but nvda doesn't. instead, it moves directly to finalizing the character. and doesn't speak the result. The result where your desired name and received age is spoken. together with the keys you can press to continue, turn back to the main menu or quit the game.

Is there a way i can force nvda to speak certain sentinces completely before moving on. Cause it would be very cool when the complete game will work with nvda... or would others suggest something different, such as keeping the sapi in as second option?
If yes, please explain to me step by step how i can add this option.

I only know by now how to make the game using nvda,but adding an options menu where every player can select their prefered type of speech is complete new knowledge to me.

To speak the sentinces, such as the credits, the sentince wich tells the player an age will be generated and the mentioned result are done with the following line:

screen_reader_speak(NVDA, "the sentinces go here, and some of them are pretty long");

Hope to hear from someone soon.

greetz mike

Visit the following website to see what games we have:
http://www.nonvisiongames.com
Or the following English marketplace to see what retrogames and game merchandise I am selling:
https://www.retro-kingdom.com

2017-12-15 08:47:41

If you use windows controls like input_box and question, those will take priority with the screen reader. You can either put the same information in the dialog box, or use some alternative like the form script that some games use.

看過來!
"If you want utopia but reality gives you Lovecraft, you don't give up, you carve your utopia out of the corpses of dead gods."
MaxAngor wrote:
    George... Don't do that.

2017-12-15 17:05:18

There is a BGT include you will want to be using, trust me, it makes this type of thing a non-issue, hold on, I have to look it up on the BGT forums. Ah, OK, here is the link.

Just use that, it works well

Facts with Tom MacDonald, Adam Calhoun, and Dax
End racism
End division
Become united

2017-12-15 21:44:39

hi,

@ironcross32

It sounds very useful, but when i try to download it via the link provided in the 1st post, i get a dropbox 404 page, telling me that the file is no longer available via the link provided.

Do you probably have it laying around somewhere?

Greetz mike

Visit the following website to see what games we have:
http://www.nonvisiongames.com
Or the following English marketplace to see what retrogames and game merchandise I am selling:
https://www.retro-kingdom.com

2017-12-16 01:11:49

well that sucks, no, I don't have it

Facts with Tom MacDonald, Adam Calhoun, and Dax
End racism
End division
Become united

2017-12-16 04:32:13

Even if the script that Ironcross32 suggested was still available for download, it most likely wouldn't resolve your issue anyway if I understand it correctly from your description. How are you making sure that the screen reader has in fact managed to speak the entire chunk of text before feeding it the next one? I guess you haven't thought of that at all and are just using the screen_reader_speak or screen_reader_speak_interrupt functions for everything that is not a question, alert or input box. Right?

You will need to implement a prompt that says something like "press enter to continue" for things like that, where Sapi speech is normally continuous and coherent, or implement an artificial screen reader speech delay mechanism where it will attempt to count how long it's approximately going to take to speak a given sentence based on its length and a multiplier that is either hardcoded or that the users themselves can configure. Neither of these is a seamless solution like what Sapi can do, I know, but unfortunately this is and has always been a long known, pretty annoying and still unresolved technical limitation of screen readers in general. They just don't provide a standard API that could accomplish something like what the speaking property of the tts_voice object does, so that you could simply take a look at whether it is still speaking the previous text or not, at any time you like.

Lukas

I won't be using this account any more or participating in the forum activity through other childish means like creating an alternate account. I've asked for the account to be removed but I'm not sure if that's actually technically possible here. Just writing this for people to know that I won't be replying, posting new topics or checking private messages until the account is potentially removed.

2017-12-16 06:35:24

It sounds like a form-related issue, though, and this would resolve it simply by providing the option to more smoothly incorporate speech into the form, rather than relying on speech and Windows controls to work together as desired. Ex, the character creation in Psycho Strike or Grave of Redemption.

看過來!
"If you want utopia but reality gives you Lovecraft, you don't give up, you carve your utopia out of the corpses of dead gods."
MaxAngor wrote:
    George... Don't do that.

2017-12-16 20:09:33

Hi. You are probably using the  screen reader speak interrupt function. That's why when you for example have a line of code which speaks something and below that is another line which speaks something else, the screen reader only speaks the second line. BTW, in those cases if there's no game play yet, You can use the wait function so it takes a bit to show the next message, and so on.

---
Co-founder of Sonorous Arts.
Check out Sonorous Arts on github: https://github.com/sonorous-arts/
my Discord: kianoosh.shakeri2#2988

2017-12-25 23:53:37

Hi all,

A few other questions.

How can i build an option in wich the player can select if he/she uses sapi or nvda for ouput?

And when one of these options is selected. wich code should i use wich owrks for both sapi as nvda output?

Cause i use the v.speak option for sapi and screen_reader_speak option if i want to output via NVDA.

But wich code should i use wich will work for both sapi and nvda?

As you can see is this rather new for me. So any help would be greatly appreciated.

greetz mike

Visit the following website to see what games we have:
http://www.nonvisiongames.com
Or the following English marketplace to see what retrogames and game merchandise I am selling:
https://www.retro-kingdom.com

2017-12-26 01:20:18

Have you at least tried to figure out a solution of your own before asking? I'm not trying to be insulting or anything, just trying to stimulate the process of learning and discovering by trial and error for yourself. Suggesting a solution to this situation is potentially tricky, as everyone uses a very different coding style and it depends on what would fit your game's coding style and layout best. Generally speaking, in programming of any kind, there is usually no single universal solution even if you are facing a problem that others have had before. Likewise, it's often equally as difficult to strictly say that a specific implementation is either completely good or completely bad. Always depends on many different factors.

Lukas

I won't be using this account any more or participating in the forum activity through other childish means like creating an alternate account. I've asked for the account to be removed but I'm not sure if that's actually technically possible here. Just writing this for people to know that I won't be replying, posting new topics or checking private messages until the account is potentially removed.

2017-12-26 01:31:55

Hi lucas,

I understand your point of view, and i don't feel it as an insult at all. I try to gather some more information on possible solutions, i don't ask for completely written out pieces of code. That deminishes the fun of trying for myself. Appologies if i gave the feeling i was asking for that. Now i read back my previous message it suggests this into my ears as well ...

I will search in the manual tomorrow, to see if i can find something useful smile

Greetz mike

Visit the following website to see what games we have:
http://www.nonvisiongames.com
Or the following English marketplace to see what retrogames and game merchandise I am selling:
https://www.retro-kingdom.com

2017-12-26 05:02:17

The manual doesn't provide any direct pointers specifically on supporting Sapi as well as screen reader output in the same application. Try to think of a possible way and outline it here, so that we can suggest possible improvements. Or if you really can't think even of a stub for anything functional, I'll try to explain my approach briefly.
Lukas

I won't be using this account any more or participating in the forum activity through other childish means like creating an alternate account. I've asked for the account to be removed but I'm not sure if that's actually technically possible here. Just writing this for people to know that I won't be replying, posting new topics or checking private messages until the account is potentially removed.

2017-12-26 10:53:44

Hi,

I will carefully think of what i want. When i really haven't a clue, i will ask here smile

Thanks a lot.

Greetz mike

Visit the following website to see what games we have:
http://www.nonvisiongames.com
Or the following English marketplace to see what retrogames and game merchandise I am selling:
https://www.retro-kingdom.com

2017-12-28 18:35:05

Hello,
Here is a piece of code that I've wrote for myself when dealing with speech output to make it a little easier. In short, if screen reader is detected, it will be used automatically, otherwise the SAPI will be used. I've made 2 functions, one for regular speech and one for use with dynamic menus.
For the general question, I got nothing to add, except that the best solution is to implement an if statement that will wait for the user to press Enter. This will make sure that the entire phrase is spoken, which is good for cutscenes or short messages. My sample cutscene code can be found in another topic.
And now, here comes my speaker BGT code:

tts_voice sapi;

void say(string tekst, bool interrupt=false)
{
bool screen_reader_found=false;
for(int counter=1; counter<5; counter++)
{
if(screen_reader_is_running(counter))
{
screen_reader_found=true;
screen_reader_speak(counter, tekst);
break;
}
}
if(!screen_reader_found)
{
sapi.speak(tekst);
}
}

void say_menu(dynamic_menu@ menu)
{
bool screen_reader_found=false;
for(int counter=1; counter<5; counter++)
{
if(screen_reader_is_running(counter))
{
screen_reader_found=true;
menu.set_speech_mode(counter);
break;
}
}
if(!screen_reader_found)
{
menu.set_speech_mode(0);
}
}

2017-12-31 20:13:01

Oops, it looks like I forgot to update my Dropbox links on the BGT forum. I'll do that now.
I'm Coderunner on the BGT forums.

2017-12-31 20:55:09

Alright, all of my topics on the BGT forum should now have working Dropbox links, so feel free to download.

2018-01-07 21:06:10

Hi,

@14

thanks for your example, will try it out.

@15 & 16

Thanks for letting us know, i will review your topics again smile

Greetz mike

Visit the following website to see what games we have:
http://www.nonvisiongames.com
Or the following English marketplace to see what retrogames and game merchandise I am selling:
https://www.retro-kingdom.com

2018-01-08 03:11:31

You can get my modified version of jason's speech manager here. I used this in grave of redemption. It has a speech delay function so that users can set it up to fit whatever voice rate they use. This eliminates the need to press enter in most cases, if you so desire.
https://www.dropbox.com/s/9r35x5tv4v016 … r.bgt?dl=0

I like to sleep, Sleep is good,
This is how I do it: Lie on a nice warm cozy bed, and dream dreams about how to rule the world!
Follow @TheGreatAthlon5 on twitter for humorous facts and game updates!
If you like my posts, thumb me up!