Author Topic: say 1 number but send 4 digits  (Read 6249 times)

Sloboda

  • Jr. Member
  • **
  • Posts: 74
  • VoiceCommander Creator
    • A.M.I.S. X Plane
say 1 number but send 4 digits
« on: February 07, 2018, 05:51:05 AM »
Hello,

i use this following code currently but i would like improve it.

So, i must send transponder code with 4 datas

data1: first digit
data 2: second...

But i would like pilot could say the integral number, like 2345

and send data1:2 data2:3 data3:4 data4: 5

Could it be possible you think ?

Thank you very much for your help.

Code: [Select]
Squawk 1
Set Text [Dictate1] to ''
Set Boolean [DictationComplete] to False
Say, 'yes'
Start Loop While : [DictationComplete] Equals False
    Start Dictation Mode (Clearing Dictation Buffer)
    Start Loop While : [{DICTATION}] Equals ''
    End Loop
    Stop Dictation Mode
    Begin Text Compare : [{EXP:{TXTNUM:"{DICTATION}"} >= 0}] Equals '1'
        Set Text [Dictate1] to '{TXTCONCAT:Dictate1:"{TXTNUM:"{DICTATION}"}"}'
    Else If Text Compare : [{EXP: '{DICTATION}' LIKE 'zero' Or '{DICTATION}' LIKE 'zéro'}] Equals '1'
        Set Text [Dictate1] to '{TXTCONCAT:Dictate1:"0"}'
    Else If Text Compare : [{EXP: '{DICTATION}' LIKE 'one' Or '{DICTATION}' LIKE 'un'}] Equals '1'
        Set Text [Dictate1] to '{TXTCONCAT:Dictate1:"1"}'
    Else If Text Compare : [{EXP: '{DICTATION}' LIKE 'two' Or '{DICTATION}' LIKE 'deux'}] Equals '1'
        Set Text [Dictate1] to '{TXTCONCAT:Dictate1:"2"}'
    Else If Text Compare : [{EXP: '{DICTATION}' LIKE 'three' Or '{DICTATION}' LIKE 'trois'}] Equals '1'
        Set Text [Dictate1] to '{TXTCONCAT:Dictate1:"3"}'
    Else If Text Compare : [{EXP: '{DICTATION}' LIKE 'four' Or '{DICTATION}' LIKE 'quatre'}] Equals '1'
        Set Text [Dictate1] to '{TXTCONCAT:Dictate1:"4"}'
    Else If Text Compare : [{EXP: '{DICTATION}' LIKE 'five' Or '{DICTATION}' LIKE 'cinq'}] Equals '1'
        Set Text [Dictate1] to '{TXTCONCAT:Dictate1:"5"}'
    Else If Text Compare : [{DICTATION}] Equals 'six'
        Set Text [Dictate1] to '{TXTCONCAT:Dictate1:"6"}'
    Else If Text Compare : [{EXP: '{DICTATION}' LIKE 'seven' Or '{DICTATION}' LIKE 'sept'}] Equals '1'
        Set Text [Dictate1] to '{TXTCONCAT:Dictate1:"7"}'
    Else If Text Compare : [{EXP: '{DICTATION}' LIKE 'eight' Or '{DICTATION}' LIKE 'huit'}] Equals '1'
        Set Text [Dictate1] to '{TXTCONCAT:Dictate1:"8"}'
    Else If Text Compare : [{EXP: '{DICTATION}' LIKE 'nine' Or '{DICTATION}' LIKE 'niner' Or '{DICTATION}' LIKE 'neuf'}] Equals '1'
        Set Text [Dictate1] to '{TXTCONCAT:Dictate1:"9"}'
    Else
        Play sound, 'C:\Windows\Media\Windows Ding.wav'
    End Condition
    Begin Text Compare : [{TXTLEN:Dictate1}] Equals '1'
        Set Boolean [DictationComplete] to True
    Else If Text Compare : [{EXP:{TXTLEN:Dictate1} > 1}] Equals '1'
        Say, 'can you repeat please ?'
        Set Text [Dictate1] to ''
    End Condition
End Loop
Set decimal [XPLANE!SIM/CUSTOM/XAP/TR_CODE_1] value to the converted value of {TXT:Dictate1}
Execute external plugin, 'SPAD.neXt VoiceAttack Plugin' and wait for return
Write '[Purple] Squawk1 {XPLANE!SIM/CUSTOM/XAP/TR_CODE_1}' to log
Say, '{TXT:Dictate1}'
Squawk 2
Set Text [Dictate1] to ''
Set Boolean [DictationComplete] to False
Start Loop While : [DictationComplete] Equals False
    Start Dictation Mode (Clearing Dictation Buffer)
    Start Loop While : [{DICTATION}] Equals ''
    End Loop
    Stop Dictation Mode
    Begin Text Compare : [{EXP:{TXTNUM:"{DICTATION}"} >= 0}] Equals '1'
        Set Text [Dictate1] to '{TXTCONCAT:Dictate1:"{TXTNUM:"{DICTATION}"}"}'
    Else If Text Compare : [{EXP: '{DICTATION}' LIKE 'zero' Or '{DICTATION}' LIKE 'zéro'}] Equals '1'
        Set Text [Dictate1] to '{TXTCONCAT:Dictate1:"0"}'
    Else If Text Compare : [{EXP: '{DICTATION}' LIKE 'one' Or '{DICTATION}' LIKE 'un'}] Equals '1'
        Set Text [Dictate1] to '{TXTCONCAT:Dictate1:"1"}'
    Else If Text Compare : [{EXP: '{DICTATION}' LIKE 'two' Or '{DICTATION}' LIKE 'deux'}] Equals '1'
        Set Text [Dictate1] to '{TXTCONCAT:Dictate1:"2"}'
    Else If Text Compare : [{EXP: '{DICTATION}' LIKE 'three' Or '{DICTATION}' LIKE 'trois'}] Equals '1'
        Set Text [Dictate1] to '{TXTCONCAT:Dictate1:"3"}'
    Else If Text Compare : [{EXP: '{DICTATION}' LIKE 'four' Or '{DICTATION}' LIKE 'quatre'}] Equals '1'
        Set Text [Dictate1] to '{TXTCONCAT:Dictate1:"4"}'
    Else If Text Compare : [{EXP: '{DICTATION}' LIKE 'five' Or '{DICTATION}' LIKE 'cinq'}] Equals '1'
        Set Text [Dictate1] to '{TXTCONCAT:Dictate1:"5"}'
    Else If Text Compare : [{DICTATION}] Equals 'six'
        Set Text [Dictate1] to '{TXTCONCAT:Dictate1:"6"}'
    Else If Text Compare : [{EXP: '{DICTATION}' LIKE 'seven' Or '{DICTATION}' LIKE 'sept'}] Equals '1'
        Set Text [Dictate1] to '{TXTCONCAT:Dictate1:"7"}'
    Else If Text Compare : [{EXP: '{DICTATION}' LIKE 'eight' Or '{DICTATION}' LIKE 'huit'}] Equals '1'
        Set Text [Dictate1] to '{TXTCONCAT:Dictate1:"8"}'
    Else If Text Compare : [{EXP: '{DICTATION}' LIKE 'nine' Or '{DICTATION}' LIKE 'niner' Or '{DICTATION}' LIKE 'neuf'}] Equals '1'
        Set Text [Dictate1] to '{TXTCONCAT:Dictate1:"9"}'
    Else
        Play sound, 'C:\Windows\Media\Windows Ding.wav'
    End Condition
    Begin Text Compare : [{TXTLEN:Dictate1}] Equals '1'
        Set Boolean [DictationComplete] to True
    Else If Text Compare : [{EXP:{TXTLEN:Dictate1} > 1}] Equals '1'
        Say, 'can you repeat please ?'
        Set Text [Dictate1] to ''
    End Condition
End Loop
Set decimal [XPLANE!SIM/CUSTOM/XAP/TR_CODE_2] value to the converted value of {TXT:Dictate1}
Execute external plugin, 'SPAD.neXt VoiceAttack Plugin' and wait for return
Write '[Purple] Squawk2 {XPLANE!SIM/CUSTOM/XAP/TR_CODE_2}' to log
Say, '{TXT:Dictate1}'
Squawk 3
Set Text [Dictate1] to ''
Set Boolean [DictationComplete] to False
Start Loop While : [DictationComplete] Equals False
    Start Dictation Mode (Clearing Dictation Buffer)
    Start Loop While : [{DICTATION}] Equals ''
    End Loop
    Stop Dictation Mode
    Begin Text Compare : [{EXP:{TXTNUM:"{DICTATION}"} >= 0}] Equals '1'
        Set Text [Dictate1] to '{TXTCONCAT:Dictate1:"{TXTNUM:"{DICTATION}"}"}'
    Else If Text Compare : [{EXP: '{DICTATION}' LIKE 'zero' Or '{DICTATION}' LIKE 'zéro'}] Equals '1'
        Set Text [Dictate1] to '{TXTCONCAT:Dictate1:"0"}'
    Else If Text Compare : [{EXP: '{DICTATION}' LIKE 'one' Or '{DICTATION}' LIKE 'un'}] Equals '1'
        Set Text [Dictate1] to '{TXTCONCAT:Dictate1:"1"}'
    Else If Text Compare : [{EXP: '{DICTATION}' LIKE 'two' Or '{DICTATION}' LIKE 'deux'}] Equals '1'
        Set Text [Dictate1] to '{TXTCONCAT:Dictate1:"2"}'
    Else If Text Compare : [{EXP: '{DICTATION}' LIKE 'three' Or '{DICTATION}' LIKE 'trois'}] Equals '1'
        Set Text [Dictate1] to '{TXTCONCAT:Dictate1:"3"}'
    Else If Text Compare : [{EXP: '{DICTATION}' LIKE 'four' Or '{DICTATION}' LIKE 'quatre'}] Equals '1'
        Set Text [Dictate1] to '{TXTCONCAT:Dictate1:"4"}'
    Else If Text Compare : [{EXP: '{DICTATION}' LIKE 'five' Or '{DICTATION}' LIKE 'cinq'}] Equals '1'
        Set Text [Dictate1] to '{TXTCONCAT:Dictate1:"5"}'
    Else If Text Compare : [{DICTATION}] Equals 'six'
        Set Text [Dictate1] to '{TXTCONCAT:Dictate1:"6"}'
    Else If Text Compare : [{EXP: '{DICTATION}' LIKE 'seven' Or '{DICTATION}' LIKE 'sept'}] Equals '1'
        Set Text [Dictate1] to '{TXTCONCAT:Dictate1:"7"}'
    Else If Text Compare : [{EXP: '{DICTATION}' LIKE 'eight' Or '{DICTATION}' LIKE 'huit'}] Equals '1'
        Set Text [Dictate1] to '{TXTCONCAT:Dictate1:"8"}'
    Else If Text Compare : [{EXP: '{DICTATION}' LIKE 'nine' Or '{DICTATION}' LIKE 'niner' Or '{DICTATION}' LIKE 'neuf'}] Equals '1'
        Set Text [Dictate1] to '{TXTCONCAT:Dictate1:"9"}'
    Else
        Play sound, 'C:\Windows\Media\Windows Ding.wav'
    End Condition
    Begin Text Compare : [{TXTLEN:Dictate1}] Equals '1'
        Set Boolean [DictationComplete] to True
    Else If Text Compare : [{EXP:{TXTLEN:Dictate1} > 1}] Equals '1'
        Say, 'can you repeat please ?'
        Set Text [Dictate1] to ''
    End Condition
End Loop
Set decimal [XPLANE!SIM/CUSTOM/XAP/TR_CODE_3] value to the converted value of {TXT:Dictate1}
Execute external plugin, 'SPAD.neXt VoiceAttack Plugin' and wait for return
Write '[Purple] Squawk2 {XPLANE!SIM/CUSTOM/XAP/TR_CODE_3}' to log
Say, '{TXT:Dictate1}'
Squawk 4
Set Text [Dictate1] to ''
Set Boolean [DictationComplete] to False
Start Loop While : [DictationComplete] Equals False
    Start Dictation Mode (Clearing Dictation Buffer)
    Start Loop While : [{DICTATION}] Equals ''
    End Loop
    Stop Dictation Mode
    Begin Text Compare : [{EXP:{TXTNUM:"{DICTATION}"} >= 0}] Equals '1'
        Set Text [Dictate1] to '{TXTCONCAT:Dictate1:"{TXTNUM:"{DICTATION}"}"}'
    Else If Text Compare : [{EXP: '{DICTATION}' LIKE 'zero' Or '{DICTATION}' LIKE 'zéro'}] Equals '1'
        Set Text [Dictate1] to '{TXTCONCAT:Dictate1:"0"}'
    Else If Text Compare : [{EXP: '{DICTATION}' LIKE 'one' Or '{DICTATION}' LIKE 'un'}] Equals '1'
        Set Text [Dictate1] to '{TXTCONCAT:Dictate1:"1"}'
    Else If Text Compare : [{EXP: '{DICTATION}' LIKE 'two' Or '{DICTATION}' LIKE 'deux'}] Equals '1'
        Set Text [Dictate1] to '{TXTCONCAT:Dictate1:"2"}'
    Else If Text Compare : [{EXP: '{DICTATION}' LIKE 'three' Or '{DICTATION}' LIKE 'trois'}] Equals '1'
        Set Text [Dictate1] to '{TXTCONCAT:Dictate1:"3"}'
    Else If Text Compare : [{EXP: '{DICTATION}' LIKE 'four' Or '{DICTATION}' LIKE 'quatre'}] Equals '1'
        Set Text [Dictate1] to '{TXTCONCAT:Dictate1:"4"}'
    Else If Text Compare : [{EXP: '{DICTATION}' LIKE 'five' Or '{DICTATION}' LIKE 'cinq'}] Equals '1'
        Set Text [Dictate1] to '{TXTCONCAT:Dictate1:"5"}'
    Else If Text Compare : [{DICTATION}] Equals 'six'
        Set Text [Dictate1] to '{TXTCONCAT:Dictate1:"6"}'
    Else If Text Compare : [{EXP: '{DICTATION}' LIKE 'seven' Or '{DICTATION}' LIKE 'sept'}] Equals '1'
        Set Text [Dictate1] to '{TXTCONCAT:Dictate1:"7"}'
    Else If Text Compare : [{EXP: '{DICTATION}' LIKE 'eight' Or '{DICTATION}' LIKE 'huit'}] Equals '1'
        Set Text [Dictate1] to '{TXTCONCAT:Dictate1:"8"}'
    Else If Text Compare : [{EXP: '{DICTATION}' LIKE 'nine' Or '{DICTATION}' LIKE 'niner' Or '{DICTATION}' LIKE 'neuf'}] Equals '1'
        Set Text [Dictate1] to '{TXTCONCAT:Dictate1:"9"}'
    Else
        Play sound, 'C:\Windows\Media\Windows Ding.wav'
    End Condition
    Begin Text Compare : [{TXTLEN:Dictate1}] Equals '1'
        Set Boolean [DictationComplete] to True
    Else If Text Compare : [{EXP:{TXTLEN:Dictate1} > 1}] Equals '1'
        Say, 'can you repeat please ?'
        Set Text [Dictate1] to ''
    End Condition
End Loop
Set decimal [XPLANE!SIM/CUSTOM/XAP/TR_CODE_4] value to the converted value of {TXT:Dictate1}
Execute external plugin, 'SPAD.neXt VoiceAttack Plugin' and wait for return
Write '[Purple] Squawk2 {XPLANE!SIM/CUSTOM/XAP/TR_CODE_4}' to log
Say, '{TXT:Dictate1}, transponder is set'



For my integral numbers, i use this code:

Code: [Select]
Set decimal [XPLANE!SIM/CUSTOM/XAP/FCU/100_1000] value to 0
Execute external plugin, 'SPAD.neXt VoiceAttack Plugin' and wait for return
Set Text [Dictate1] to ''
Set Boolean [DictationComplete] to False
Say, 'yes'
Set decimal [count] value to 0
Start Loop While : [DictationComplete] Equals False
    Start Dictation Mode (Clearing Dictation Buffer)
    Start Loop While : [{DICTATION}] Equals ''
    End Loop
    Stop Dictation Mode
    Begin Text Compare : [{EXP:{TXTNUM:"{DICTATION}"} >= 0}] Equals '1'
        Set Text [Dictate1] to '{TXTCONCAT:Dictate1:"{TXTNUM:"{DICTATION}"}"}'
    Else If Text Compare : [{EXP: '{DICTATION}' LIKE 'zero' Or '{DICTATION}' LIKE 'zéro'}] Equals '1'
        Set Text [Dictate1] to '{TXTCONCAT:Dictate1:"0"}'
    Else If Text Compare : [{EXP: '{DICTATION}' LIKE 'one' Or '{DICTATION}' LIKE 'un'}] Equals '1'
        Set Text [Dictate1] to '{TXTCONCAT:Dictate1:"1"}'
    Else If Text Compare : [{EXP: '{DICTATION}' LIKE 'two' Or '{DICTATION}' LIKE 'deux'}] Equals '1'
        Set Text [Dictate1] to '{TXTCONCAT:Dictate1:"2"}'
    Else If Text Compare : [{EXP: '{DICTATION}' LIKE 'three' Or '{DICTATION}' LIKE 'trois'}] Equals '1'
        Set Text [Dictate1] to '{TXTCONCAT:Dictate1:"3"}'
    Else If Text Compare : [{EXP: '{DICTATION}' LIKE 'four' Or '{DICTATION}' LIKE 'quatre'}] Equals '1'
        Set Text [Dictate1] to '{TXTCONCAT:Dictate1:"4"}'
    Else If Text Compare : [{EXP: '{DICTATION}' LIKE 'five' Or '{DICTATION}' LIKE 'cinq'}] Equals '1'
        Set Text [Dictate1] to '{TXTCONCAT:Dictate1:"5"}'
    Else If Text Compare : [{DICTATION}] Equals 'six'
        Set Text [Dictate1] to '{TXTCONCAT:Dictate1:"6"}'
    Else If Text Compare : [{EXP: '{DICTATION}' LIKE 'seven' Or '{DICTATION}' LIKE 'sept'}] Equals '1'
        Set Text [Dictate1] to '{TXTCONCAT:Dictate1:"7"}'
    Else If Text Compare : [{EXP: '{DICTATION}' LIKE 'eight' Or '{DICTATION}' LIKE 'huit'}] Equals '1'
        Set Text [Dictate1] to '{TXTCONCAT:Dictate1:"8"}'
    Else If Text Compare : [{EXP: '{DICTATION}' LIKE 'nine' Or '{DICTATION}' LIKE 'niner' Or '{DICTATION}' LIKE 'neuf'}] Equals '1'
        Set Text [Dictate1] to '{TXTCONCAT:Dictate1:"9"}'
    Else If Text Compare : [{EXP: '{DICTATION}' LIKE 'pied' Or '{DICTATION}' LIKE 'feet' Or '{DICTATION}' LIKE 'feets'}] Equals '1'
        Set Text [Dictate1] to '{TXTCONCAT:Dictate1:""}'
    Else
        Set decimal [count]to [count] plus 1.00000
        Begin Decimal Compare : [Count] Equals 3
            Stop all text-to-speech
            Pause 0.3 seconds
            Say, 'i am busy please retry later'
        End Condition - Exit when condition met
        Play sound, 'C:\Windows\Media\Windows Ding.wav'
    End Condition
    Begin Text Compare : [{EXP:{TXTLEN:Dictate1} > 2}] Equals '1'
        Set Boolean [DictationComplete] to True
    End Condition
    Begin Text Compare : [{EXP:{TXTLEN:Dictate1} > 5}] Equals '1'
        Set decimal [count]to [count] plus 1.00000
        Say, 'can you repeat please ?'
        Set Text [Dictate1] to ''
    End Condition
End Loop
Begin Decimal Compare : [Count] Equals 3
    Stop all text-to-speech
    Pause 0.3 seconds
    Say, 'i am busy please retry later'
End Condition - Exit when condition met
Write '[Purple] Dictate {TXT:Dictate1}' to log
Set decimal [XPLANE!SIM/CUSTOM/XAP/FCU/ALT100X] value to the converted value of {TXT:Dictate1}
Execute external plugin, 'SPAD.neXt VoiceAttack Plugin' and wait for return
Set decimal [XPLANE!SIM/CUSTOM/XAP/FCU/ALT100X]to [XPLANE!SIM/CUSTOM/XAP/FCU/ALT100X] times 100
Say, 'altitude {DEC:XPLANE!SIM/CUSTOM/XAP/FCU/ALT100X} is set'
Write '[Purple] AltPer100 {DEC:XPLANE!SIM/CUSTOM/XAP/FCU/ALT100X}' to log


TheThingIs

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 278
    • HCS Voicepacks
Re: say 1 number but send 4 digits
« Reply #1 on: February 07, 2018, 08:45:05 AM »
if you split them into segments then you can access them individually. So,

This will work if you say "Data one two three four"

Data [0..9][0..9][0..9][0..9]

would alloy you to access each one using:

{CMDSEGMENT:1} will = 1
{CMDSEGMENT:2} will = 2
{CMDSEGMENT:3} will = 3
{CMDSEGMENT:4} will = 4

if you need the user to say "Data 1 thousand 2 hundred and thirty four" then it gets a bit more complicated with all the different ways to say the number :)

also note that CMDSEGMENT starts at 0 so {CMDSEGMENT:0} = "data"

HTH
The Singularity profile - One profile to rule them all and at HCS we bound them ;)

You see, TheThingIs, eventually you'll be allright.

Sloboda

  • Jr. Member
  • **
  • Posts: 74
  • VoiceCommander Creator
    • A.M.I.S. X Plane
Re: say 1 number but send 4 digits
« Reply #2 on: February 07, 2018, 10:12:28 AM »
Thx very much for your answer TheThingIs,

I'm not really good, i'm sorry...

I start code like currently for concat my 4 numbers, then, i use your {CMDSEGMENT:1} like:
convert {CMDSEGMENT:1} to decimal1
send the decimal1
convert {CMDSEGMENT:2} to decimal2
send the decimal2
...

???

Many Thx

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4761
  • RTFM
Re: say 1 number but send 4 digits
« Reply #3 on: February 07, 2018, 04:16:03 PM »
If you want to use dictation(to save on the amount of created commands):
Code: [Select]
Set Boolean [DictationComplete] to False
Start Loop While : [DictationComplete] Equals False
    Start Dictation Mode (Clearing Dictation Buffer)
    Start Loop While : [{DICTATION}] Equals ''
    End Loop
    Stop Dictation Mode
    Begin Text Compare : [{TXTLEN:"{TXTNUM:{DICTATION}}"}] Equals '4'
        Set Boolean [DictationComplete] to True
    Else If Text Compare : [{DICTATION}] Equals 'cancel'
        Write '[Purple] Cancelled entry' to log
        Exit Command
    Else
        Play sound, 'C:\Windows\Media\Windows Ding.wav'
    End Condition
End Loop
Start Loop : Repeat From 1 to 4
    Set decimal [XPLANE!SIM/CUSTOM/XAP/TR_CODE_{INT:~LoopCounter}] value to the converted value of {TXTSUBSTR:"{DICTATION}":{EXP: {INT:~LoopCounter} - 1}:1}
    Execute external plugin, 'SPAD.neXt VoiceAttack Plugin' and wait for return
    Write '[Purple] {DEC:XPLANE!SIM/CUSTOM/XAP/TR_CODE_{INT:~LoopCounter}}' to log
End Loop


If you want to use TheThingIs's example:
Code: [Select]
Start Loop : Repeat From 1 to 4
    Set decimal [XPLANE!SIM/CUSTOM/XAP/TR_CODE_{INT:~LoopCounter}] value to the converted value of {CMDSEGMENT:{INT:~LoopCounter}}
    Execute external plugin, 'SPAD.neXt VoiceAttack Plugin' and wait for return
    Write '[Purple] {DEC:XPLANE!SIM/CUSTOM/XAP/TR_CODE_{INT:~LoopCounter}}' to log
End Loop

Or
Code: [Select]
Set decimal [XPLANE!SIM/CUSTOM/XAP/TR_CODE_1] value to the converted value of {CMDSEGMENT:1}
Execute external plugin, 'SPAD.neXt VoiceAttack Plugin' and wait for return
Set decimal [XPLANE!SIM/CUSTOM/XAP/TR_CODE_2] value to the converted value of {CMDSEGMENT:2}
Execute external plugin, 'SPAD.neXt VoiceAttack Plugin' and wait for return
Set decimal [XPLANE!SIM/CUSTOM/XAP/TR_CODE_3] value to the converted value of {CMDSEGMENT:3}
Execute external plugin, 'SPAD.neXt VoiceAttack Plugin' and wait for return
Set decimal [XPLANE!SIM/CUSTOM/XAP/TR_CODE_4] value to the converted value of {CMDSEGMENT:4}
Execute external plugin, 'SPAD.neXt VoiceAttack Plugin' and wait for return

Sloboda

  • Jr. Member
  • **
  • Posts: 74
  • VoiceCommander Creator
    • A.M.I.S. X Plane
Re: say 1 number but send 4 digits
« Reply #4 on: February 08, 2018, 04:10:35 AM »
Many thx for all, just last question, is it possible to import your code directly in mine ?

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4761
  • RTFM
Re: say 1 number but send 4 digits
« Reply #5 on: February 08, 2018, 05:36:38 AM »
I've attached both versions of the command so you can import them.

The second version("transponder set using segments") needs to be renamed before use(to "Set transponder to [0..9][0..9][0..9][0..9]", or something similar); As it generates 10000 command variations, I'd rather not leave it that way in my profile.

Sloboda

  • Jr. Member
  • **
  • Posts: 74
  • VoiceCommander Creator
    • A.M.I.S. X Plane
Re: say 1 number but send 4 digits
« Reply #6 on: February 08, 2018, 08:36:01 AM »
Pfeil,

Thx again and again, you are very cool.

Have a good day.

OperationDx

  • Guest
Re: say 1 number but send 4 digits
« Reply #7 on: February 28, 2018, 01:20:43 AM »
How has this profile been developing?  I assume that the transponder was not the only purpose of this kind of coding.  I've been searching for a good X Plane Profile but am having a hard time finding one.  I purchased a program called Pilot command but I think it can be done much better in VoiceAttack.  I assume to get this kind of output working  I have to purchase SPAD.neXt? 

Before I undertake the task of developing my own profile I was wondering how far this has gone.

Thanks.

Sloboda

  • Jr. Member
  • **
  • Posts: 74
  • VoiceCommander Creator
    • A.M.I.S. X Plane
Re: say 1 number but send 4 digits
« Reply #8 on: February 28, 2018, 01:28:30 AM »
Hello,

with humility, my Soft VoiceCommander is the best copilot for XPlane.

You can see demonstrations on my channel:
http://www.youtube.com/c/LanglaisGuillaume

VoiceCommander profiles available on my website:
https://xplane.amisinformatique.com

Have a good day

OperationDx

  • Guest
Re: say 1 number but send 4 digits
« Reply #9 on: February 28, 2018, 02:10:14 AM »
Thanks!  I'll check it out.

OperationDx

  • Guest
Re: say 1 number but send 4 digits
« Reply #10 on: February 28, 2018, 02:38:21 AM »
VoiceCommander looks interesting and very much like Plane Command. 

Programming a key press in voice attack is super easy.  And I like the fact that Voice attack rejects bad commands.

Honestly what I am really interested in is what was talked about in this thread.

I want to say squawk 2525 and my transponder changes to 2525.

I want to say change heading to two seven zero.  And my heading bug moves to 270

I want to say change nav 1 to one thirteen point nine or say one one three point nine.  And nav one radio changes to 113.9

I also like the option to put in custom sounds.  I honestly can't stand text to speech reply's.  If I can't figure it out then  I could always use a most simple approach.  I could just say turn left 5 degrees and have voice attack just hit a key 5 times.  But AI would rather just say the number.

OperationDx

  • Guest
Re: say 1 number but send 4 digits
« Reply #11 on: February 28, 2018, 08:44:28 AM »
Can you change X Plane data refs with Voiceattack with out SPAD.neXt?

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4761
  • RTFM
Re: say 1 number but send 4 digits
« Reply #12 on: February 28, 2018, 10:04:50 AM »
Can you change X Plane data refs with Voiceattack with out SPAD.neXt?
Technically yes, realistically no.

VoiceAttack can compile and run C#(or VB.NET) code, so you could theoretically build a plugin or inline function to interface with X-Plane directly, but unless you're a somewhat capable programmer(and have plenty of spare time) you're better off using something like SPAD.neXt where both the research and implementation have been done for you.

OperationDx

  • Guest
Re: say 1 number but send 4 digits
« Reply #13 on: February 28, 2018, 10:16:52 AM »
Thank you.  I don't want to over complicate things.  It already seems challenging enough to do this with the plugin.

Sloboda

  • Jr. Member
  • **
  • Posts: 74
  • VoiceCommander Creator
    • A.M.I.S. X Plane
Re: say 1 number but send 4 digits
« Reply #14 on: February 28, 2018, 11:44:59 PM »
VoiceCommander looks interesting and very much like Plane Command. 

Programming a key press in voice attack is super easy.  And I like the fact that Voice attack rejects bad commands.

Honestly what I am really interested in is what was talked about in this thread.

I want to say squawk 2525 and my transponder changes to 2525.

I want to say change heading to two seven zero.  And my heading bug moves to 270

I want to say change nav 1 to one thirteen point nine or say one one three point nine.  And nav one radio changes to 113.9

I also like the option to put in custom sounds.  I honestly can't stand text to speech reply's.  If I can't figure it out then  I could always use a most simple approach.  I could just say turn left 5 degrees and have voice attack just hit a key 5 times.  But AI would rather just say the number.

If you want great realism, you can't use recording sentences, because my copilot say to you some decimals you have command. So, if you would use recording waves, you should record thousands of numbers

Sloboda

  • Jr. Member
  • **
  • Posts: 74
  • VoiceCommander Creator
    • A.M.I.S. X Plane
Re: say 1 number but send 4 digits
« Reply #15 on: March 01, 2018, 12:01:38 AM »
Can you change X Plane data refs with Voiceattack with out SPAD.neXt?

Impossible

Sloboda

  • Jr. Member
  • **
  • Posts: 74
  • VoiceCommander Creator
    • A.M.I.S. X Plane
Re: say 1 number but send 4 digits
« Reply #16 on: March 01, 2018, 12:03:16 AM »
Can you change X Plane data refs with Voiceattack with out SPAD.neXt?
Technically yes, realistically no.

VoiceAttack can compile and run C#(or VB.NET) code, so you could theoretically build a plugin or inline function to interface with X-Plane directly, but unless you're a somewhat capable programmer(and have plenty of spare time) you're better off using something like SPAD.neXt where both the research and implementation have been done for you.

Yes