Author Topic: Separate digits  (Read 3933 times)

snake75

  • Guest
Separate digits
« on: February 27, 2018, 06:14:11 PM »
Hi !
I'm new to Voice attack and use it for DCS World.
This thing is incredible !
But i have a problem.
I often need to say digits for my GPS, but for the moment it's slow...
I have to say "one" then wait, after say for exemple "three" then wait etc etc.

Is it possible to say, for exemple "four six nine three zero" in one sentance and voice attack separate each digits ?
I see some things with "code" but i'm a real newbi...

(sorry for my english, i'm french haha)

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: Separate digits
« Reply #1 on: February 28, 2018, 01:55:24 PM »
It's possible, however, if the amount of digits/numbers needs to be variable it cannot be implemented into a single command(as multiple optional identical command sections like [1..9;] [1..9;] cannot currently be extrapolated into command phrases).
In addition, any command that uses numeric dynamic command sections tends to balloon the amount of command phrases, making a profile very slow to load and/or edit.

Have a look at this topic, which contains some examples of a system that enables speaking of a four digit number and splits it into separate digits. This post has the examples attached as a .vap so you can import them directly into VoiceAttack.

iceblast

  • Sr. Member
  • ****
  • Posts: 374
Re: Separate digits
« Reply #2 on: March 01, 2018, 08:55:51 AM »
You can use this code. The only thing is, when you make it, it takes awhile for VoiceAttack to create it after you hit enter. After you have created it though, the profile loads very fast, the hard part is just creating it.

If you only need to enter 5 digit numbers, then you only need this as your spoken phrase.  but you couldn't just say two numbers and stop, because VoiceAttack wouldn't know what to do with that. You have to make 5 commands to cover for each place.

Command trigger spoken phrase should be like this. You can add words to it, Like, Enter if you want.


The more digit places, the long it will take VoiceAttack to create the command. Your going to need some patience. I tried to make one for 5 digits, but after 90mins I killed it. You can't use VoiceAttack while creating commands, and I needed VoiceAttack for other things. You might want to make the command, and go to bed, with any luck it will be done after you wake up. I have 1 through 4 digit commands made, it doesn't slow down the profile from loading at all. Creating the commands are just he hard part, after you do that, you should be home free, just don't try to change the command, because you'll have to wait all over again.

Code: [Select]
Set Text [count] to '{CMD}'
Set integer [count] value to the converted value of {TXTNUM:count}
Quick Input, '{TXTNUM:count}'



You can make up to 2 commands, and pause after every 2 numbers you say.

Or you could go to 4 commands and say four six nine three pause for the first 4 to enter, then say zero.

Or you could go for all 5, or anywhere inbetween.

VoiceAttack will wait till you stop talking before it enters any numbers, and it will enter them all at the same time. It works fine for me.

Hope this helps.

[Edit] For some reason I can't post my full comment, it keeps erroring out. So, I'm going to attach a txt file, with my comment in it. :) So you can understand what I'm trying to say.
« Last Edit: March 01, 2018, 09:15:19 AM by iceblast »

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2832
Re: Separate digits
« Reply #3 on: March 01, 2018, 10:37:06 AM »
Quote
The more digit places, the long it will take VoiceAttack to create the command. Your going to need some patience. I tried to make one for 5 digits, but after 90mins I killed it.

Do you have an example of this?

iceblast

  • Sr. Member
  • ****
  • Posts: 374
Re: Separate digits
« Reply #4 on: March 01, 2018, 11:06:17 AM »
Not sure what you mean, I can be a bit dense sometimes.

I'll attach a profile with the commands minus one for 5, because I couldn't wait for it to finish.

It's pretty easy what I did, if you create another one with 5 [0..10] you'll see it takes a really long time to complete it, but afterwards, there is no lag switching profiles.
« Last Edit: March 01, 2018, 11:11:18 AM by iceblast »

iceblast

  • Sr. Member
  • ****
  • Posts: 374
Re: Separate digits
« Reply #5 on: March 02, 2018, 02:49:23 AM »
Ok, here is a profile with 1 through 5 digit possible input. It takes about 2 seconds for the profile to load for me. You can say 1, 12, 123, 1234, 12345, I just used VA to enter those numbers, worked fine.

Now, I have not idea if you can add this profile to your VA and have it work instantly, or if VA will have to create the commands before it loads the profile the first time. So, if it's going to need to build the commands first, it could take a few hours the first time you go to use it, but after that, it should load right away.

You can edit the commands without having VA rebuild the command again, but if you edit the spoken phrase, VA will rebuild the command, which means depending on which one you do, it could take hours.

I made the 5 digit one, by starting the creation of it, and going to sleep for VA to build it. Easier that way.

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2832
Re: Separate digits
« Reply #6 on: March 05, 2018, 09:03:23 AM »
I think I've got the very long wait thing worked out.  It all has to do with duplicate checking on add with dynamic commands, so, the number of commands generated (millions) x number commands you've already got = :P   In your case, it was 90 minutes+, but if you had an empty profile it would be a lot faster.  Seems a lot better now, though.
 Hoping it will be in the next release.

iceblast

  • Sr. Member
  • ****
  • Posts: 374
Re: Separate digits
« Reply #7 on: March 05, 2018, 11:38:56 AM »
Cool, I'll try it out!

Like the new look for VA by the way.