Author Topic: Switching profiles with voice message  (Read 6346 times)

SilentWarrior

  • Guest
Switching profiles with voice message
« on: November 28, 2016, 04:20:07 PM »
Hi,

I tried to switch profiles utilizing VA's voice commands as explained in this tutorial: https://forums.frontier.co.uk/showthread.php/133188-Switching-Profiles-In-Voice-Attack-Made-Easy

Profil changing works but when I try to play a TTS message AFTER the profil change I get an "Stopped command (...)" error. But I can not hear any TTS message.

I tired to play the TTS message before changing the profile. I can hear the TTS message when I tick "Wait until speech completes before continuing command" in the TTS message. But this will delay the profile change unecessarily. Without the tick I can NOT hear the TTS message.

Is the tutorial obsolete? Is it still intended to use this way?

What do I have to adjust to get the TTS message without delaying the profil change?

I hope someone can help me.
Thank you in advance.

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2826
Re: Switching profiles with voice message
« Reply #1 on: November 28, 2016, 09:07:37 PM »
When a VoiceAttack profile changes, the entire command stack is stopped.  That includes sound and TTS, as the sounds and tts are tracked by the commands that initiate them.  Unfortunately, I don't have a workaround for you other than to put the 'switching profile' tts in the startup command of the started profile.  Maybe set a variable as a flag prior to switching so it only plays in certain cases.

SilentWarrior

  • Guest
Re: Switching profiles with voice message
« Reply #2 on: November 29, 2016, 08:25:30 AM »
Thank you for the quick answer.

I tried to load a command on profil load/change and it works as expected.

But due to the fact that I am a programmer and like to keep my "code" redundance-free I would like to but that specific command (which should run in my concrete profiles) in a base-class lke structure. I can import another profil in my concrete profil and that structure works fine. But I can not select a command from the base class to run on profil loading.

Is this intended? / Could you implement the feature to make inherited commands executable/selectable on profil loading? And also select multiple commands to execute on loading? (Prevents us from concatenating commands)

But due to I am a programmer I also know the difficulty to implement obviously easy customer request, based on a complex backend code. Any chances?

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2826
Re: Switching profiles with voice message
« Reply #3 on: November 29, 2016, 11:54:34 AM »
Yeah... that would be stretching the limits of what a profile really is (a separate, self-contained unit).  The idea of, 'linking' a profile is very loose as profiles are created and shared individually and trying to tie them all together in a package gets kind of messy.  Moving to an inheritance system of profiles, although being ideal, would be understood and used by about .001% of VA users.  Good suggestion, though.  There will be a day where we will have multiple, stacked profiles in VA, FWIW.

What I wanted to say yesterday (this may be what you have already implemented), using global variables to keep track of things (if it helps any):

Profile A  (active profile)
Profile B  (the profile you are switching to)

From Profile A : 
    Say, "Switch Profile"
        Command "Switch Profile" executes:
            Set text variable SwitchTTS to "The profile is switching"
            Switch to Profile B

Profile B contains a startup command, 'Startup Command' (voice turned off)
    Startup Command executes (since Profile B is starting up):
        If SwitchTTS (its global) Is Set (not null)
            Say {TXT:SwitchTTS}
        end if



 


Gangrel

  • Caffeine Fulled Mod
  • Global Moderator
  • Full Member
  • *****
  • Posts: 216
  • BORK FNORK BORD
Re: Switching profiles with voice message
« Reply #4 on: November 29, 2016, 01:35:53 PM »
When a VoiceAttack profile changes, the entire command stack is stopped.  That includes sound and TTS, as the sounds and tts are tracked by the commands that initiate them.  Unfortunately, I don't have a workaround for you other than to put the 'switching profile' tts in the startup command of the started profile.  Maybe set a variable as a flag prior to switching so it only plays in certain cases.

Why not have all of the logic in a "profile switch" profile?

You could set the variables and running logic in that profile and then just use the "include commands from" option to choose "profile switch" profile.

Side note: Yes I am the person who has a chain of 7 or 8 profiles (and there are 15 other profiles that calls that "chain".)