News:

There is now a ChangeLog page on the wiki
New developments are added at the bottom of the page.

Main Menu

Can VC knows which version is running ?

Started by Haddood, September 02, 2014, 07:13:30 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Haddood

is there is a way that I can check which version is running ? SP or SAPI by using python, variables ...etc.
When Voice command gets tough, use hand gestures

jitterjames

You can look at the main window to see this information but there is no action or variable built into vc that does this.

Kalle

Maybe I am wrong or did not understand the question.
VC sapi version run as voxcommando.exe and SP run as voxcommandoSP.exe in the taskmanager, so you can use a logic command to check which version is running like:

IF Process running  voxcommandoSP.exe THEN "any action" ELSE "any other action"

Let me know if this is for what you looking for.
***********  get excited and make things  **********

Haddood

#3
Quote from: Kalle on September 02, 2014, 01:57:32 PM
Maybe I am wrong or did not understand the question.
VC sapi version run as voxcommando.exe and SP run as voxcommandoSP.exe in the taskmanager, so you can use a logic command to check which version is running like:

IF Process running  voxcommandoSP.exe THEN "any action" ELSE "any other action"

Let me know if this is for what you looking for.

Kalle
you understood the question perfectly ... and you nailed the answer perfectly  :clap :clap :clap

however if James consider putting in a constant in the code that we can check like {engine} or similar would be cool

these days I am doing tests with both systems till I make my mind and I do not want to maintain 2 installations ... I prefer make the command that are related to SP or non with a little if statement
When Voice command gets tough, use hand gestures

Kalle

I'm not sure if there are really a users which use this value except you  ;)  so it is easier to store this value in a Maptable when VC is loaded as James would write the code for VC, maybe I'm wrong and it is also easy to write the code.  ::)
***********  get excited and make things  **********

Haddood

map table won't do ... as both versions can read it .... it has be embedded in the exe file .... programmatically it should be about  one line declaring a global variable however not sure how is VC written ...

I know it is not that important ... that is why I did not put it in feature request ..
When Voice command gets tough, use hand gestures

Kalle

Upps, I think you missunderstand me - As example: When you start VC-SP, you can trigger the logic above by VC.loaded event and store a value in the Maptable. ::hmm
***********  get excited and make things  **********

jitterjames

I think Kalle means that you can use the logic block with "if process running"  to set a map varriable.

This seems like a simple and elegant solution that will work perfectly (unless you are running muliple version of VC simultaneously) and I can't see why you would need anything more.

If it were me though, I would just use a variable.  There is no need for a map table in this case.

Something like this:
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.0.0-->
<command id="1064" name="set version var" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType />
    <params />
    <cmdRepeat>1</cmdRepeat>
  </action>
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>ProcessRunning</ifType>
    <ifParams>VoxCommandoSP&amp;&amp;</ifParams>
    <then>
      <action>
        <cmdType>Results.SetVar</cmdType>
        <params>
          <param>VcVersion</param>
          <param>SP</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else>
      <action>
        <cmdType>Results.SetVar</cmdType>
        <params>
          <param>VcVersion</param>
          <param>Regular</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </else>
  </if>
  <event>VC.Loaded</event>
</command>

Haddood

Kalle,

Yep I misunderstood you ... sorry for that ...

James thanks for the xml ...
When Voice command gets tough, use hand gestures

Kalle

QuoteThis seems like a simple and elegant solution that will work perfectly (unless you are running muliple version of VC simultaneously) and I can't see why you would need anything more.
This will work also with multiple instances of VC when you rename each voxcommando.exe like voxcommandoForMovies.exe, voxcommandoForWhatEver.exe, etc. .   :-*
***********  get excited and make things  **********