Author Topic: "Wait for spoken response" command- a little help to newbaby pls  (Read 3222 times)

salep

  • Newbie
  • *
  • Posts: 9
hello everyone
i'm new at voice attack and i love it.

i'm trying to learn commands.
i read the pdf and searched google but still cant do lots of thing i need some examples.
can u pls help me with this little command.

i want when i say "number"
computer will write the number i said from 1-10
i tried this

when i say "number"

Play sound, 'internal:Gobbo'
Wait for spoken response: ''0;1;2;3;4;5;6;7;8;9;''
Pause 0,1 seconds
Set integer [number] value to the converted value of {TXT:number}
Set Windows clipboard to '{TXT:number} '
Pause 0,1 seconds
Press and release Left Ctrl+V keys


 it sometimes works but sometimes doesnt and types "not set" instead of the number.
and voiceattack log shows "

Integer token could not be converted : {TXT:number}"
"Unrecognized : 'one'   -numbers i said



i'm trying to learn "Wait for spoken response" commands.
so if someone can help me i will be so happy because i am not able to figure out what is wrong




Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: "Wait for spoken response" command- a little help to newbaby pls
« Reply #1 on: October 18, 2020, 08:31:57 AM »
Your current example allows numbers from zero to nine; If you want one to ten you'd want to replace that with something like "[1..10]" (press F1 while VoiceAttack has focus to open VoiceAttackHelp.pdf in your default PDF viewer and search for "Dynamic command sections").
I'd also refrain from having blank sections (as the trailing semicolon currently creates), even though those are likely trimmed automatically.

As the documentation notes, the value the "Wait For Spoken Response" action sets would be "Not set" if you have the "Timeout" option set to anything but 0, and that time limit is reached.


There are a number of redundant actions in your command as well, as neither of the pauses should have any effect on the outcome (as the actions preceding them run synchronously, I.E. the command waits until their task is complete before proceeding), and the "Set an Integer Value" action sets a variable that's never used.

salep

  • Newbie
  • *
  • Posts: 9
Re: "Wait for spoken response" command- a little help to newbaby pls
« Reply #2 on: October 18, 2020, 09:37:23 AM »
Your current example allows numbers from zero to nine; If you want one to ten you'd want to replace that with something like "[1..10]" (press F1 while VoiceAttack has focus to open VoiceAttackHelp.pdf in your default PDF viewer and search for "Dynamic command sections").
I'd also refrain from having blank sections (as the trailing semicolon currently creates), even though those are likely trimmed automatically.

As the documentation notes, the value the "Wait For Spoken Response" action sets would be "Not set" if you have the "Timeout" option set to anything but 0, and that time limit is reached.


There are a number of redundant actions in your command as well, as neither of the pauses should have any effect on the outcome (as the actions preceding them run synchronously, I.E. the command waits until their task is complete before proceeding), and the "Set an Integer Value" action sets a variable that's never used.

thank u for reply sir but im  not able to figure out things in pdf there so little examples.
is there any profile with lots of command examples that i can study ?
if u can show how to do my command  better it would be a great help too.


Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: "Wait for spoken response" command- a little help to newbaby pls
« Reply #3 on: October 18, 2020, 09:58:38 PM »
If the command you pasted was verbatim, you also had extra single quotes around your spoken response phrase, meaning it'd be looking for
Code: [Select]
'0instead of
Code: [Select]
0

This should work correctly:
Code: [Select]
Play sound, 'internal:Gobbo'
Wait for spoken response: '[1..10]'
Set Windows clipboard to '{TXT:number} '
Press and release Left Ctrl+V keys

iceblast

  • Sr. Member
  • ****
  • Posts: 372
Re: "Wait for spoken response" command- a little help to newbaby pls
« Reply #4 on: October 19, 2020, 05:23:35 PM »
There are many videos on youtube about making commands for Voiceattack. I think you might get a lot of understanding from them. It's a quick way to learn how to take advantage of many things you can do with VA.

salep

  • Newbie
  • *
  • Posts: 9
Re: "Wait for spoken response" command- a little help to newbaby pls
« Reply #5 on: October 21, 2020, 06:55:13 AM »
If the command you pasted was verbatim, you also had extra single quotes around your spoken response phrase, meaning it'd be looking for
Code: [Select]
'0instead of
Code: [Select]
0

This should work correctly:
Code: [Select]
Play sound, 'internal:Gobbo'
Wait for spoken response: '[1..10]'
Set Windows clipboard to '{TXT:number} '
Press and release Left Ctrl+V keys



sorry for late answer i thought no one gonno answer.
"I learned wait for respond" and using it for page "up/down" "yes/no" kind of things but
it doesnt get numbers it says "not set"

this doesnt work either
Code: [Select]
Play sound, 'internal:Gobbo'
Wait for spoken response: '[1..10]'
Set Windows clipboard to '{TXT:number} '
Press and release Left Ctrl+V keys
[/quote]"

I simply gave up on it. still thank u for trying the help.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: "Wait for spoken response" command- a little help to newbaby pls
« Reply #6 on: October 21, 2020, 06:59:01 AM »
What does your actual command look like? Either right-click the action list, select "Copy All as Text", and paste here, or take a screenshot and attach it to your post.

salep

  • Newbie
  • *
  • Posts: 9
Re: "Wait for spoken response" command- a little help to newbaby pls
« Reply #7 on: October 21, 2020, 07:37:41 AM »
I think i just realised the problem. I tried your command again and it worked.
my stupid mistake was selecting 1,5 second for timeout of "wait for respond"
this is why sometimes it is working but sometime it writes not set
after choosing it 3 second it worked nicely.
sorry for wasting your time but u are a hero and u know it :)