ARC Pro

Upgrade to ARC Pro

Get access to the latest features and updates before they're released. You'll have everything that's needed to unleash your robot's potential!

#1  

Okay - that's a good idea to add that ability. We'll add a ControlCommand() to do that for you in a future update on the robot skill. It is currently in the middle of being evaluated for significant development changes based on a request. Due to that, we're unsure when the codebase will be stable for an update. In the meantime, keep an eye out for when the VAD robot skill is updated based on the current investigation of how the algorithm can be improved.

#2  

In the meantime, you can create a global variable, such as $VADActivated. In the VAD Start and End scripts, check the variable in the code. It would be similar to using a ControlCommand() to pausing or unpausing.

To disable VAD in another robot skill, set the variable...

setVar("$VADActivated", false);

In the VAD scripts, check for the variable

if (getVar("$VADActivated", true) {
  // do the things
}

The getVar() accepts an optional parameter of the default value. In the above example, the default value is set to TRUE. That ensures if the $VADActivate has not been set before, that it will default to the TRUE value. The manual for getVar() explains more: https://synthiam.com/Support/javascript-api/javascript-overview

PRO
Australia
#3  

@Athena There's no urgency for any of this, but I am finding the VAD Skill pauses after ChatGPT comes back with a response. I hadn't expected this. And of course I can't unpause it with code. Is this normal?

#4  

This might be because the Chat GPT skill uses one of the Audio.say() commands. The VAD pauses when ARC is instructed to speak. This behavior is not related to the Chat GPT robot skill. It is related to the command that your scripts are running from the Chat GPT robot skill.

PRO
Canada
#5  

Yes, the Voice Activity Detection (VAD) skill is designed to pause automatically when any of the Audio.say() commands are executed. This is to prevent the VAD from detecting the robot's own speech as a false positive. Once the speech has completed, the VAD will automatically unpause.

If you want to control this behavior manually, you can use a global variable as a workaround, as suggested earlier. Here's a quick recap of how you can implement this:

  1. Create a Global Variable:

    • You can create a global variable, such as $VADActivated, to control whether the VAD should execute its scripts.
  2. Modify VAD Scripts:

    • In the VAD Start and End scripts, check the value of this variable before executing any actions. For example:
    if (getVar($VADActivated, true)) {
        // Execute your actions here
    }
    
  3. Control the Variable:

    • In other parts of your project, you can set this variable to false to effectively "pause" the VAD, and set it back to true to "unpause" it.
    // To pause VAD
    setVar($VADActivated, false);
    
    // To unpause VAD
    setVar($VADActivated, true);
    

This approach allows you to have more control over when the VAD should be active, even if the automatic pausing behavior is triggered by the Audio.say() commands. If you have any more questions or need further assistance, feel free to ask!


I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.
PRO
Synthiam
#6  

Sounds like it isn’t unpausing automatically after the speech is completed.

what Audio.say() are you using?

#7  

The Audio.sayEZB commands have been fixed to restore speech recognition pause states after speaking in the next ARC update.

PRO
Australia
#8  

Audio.Say is using thePC sound card. The VAD Skill stays paused after the audio.say is executed. Athena's idea of setting a variable to true or false to change the pause status of the VAD Skill is nonsense (sorry Athena). I will try the VAD Skill again in the next update. Thanks.

PRO
Synthiam
#9   — Edited

The current version of ARC works fine with the Audio.say() unpausing and pausing the VAD as designed. It looks like there was an issue with the Audio.sayEZB() commands. BUt the Audio.say() pauses the VAD while speaking, and unpauses when completed, as designed.

  1. While speaking...

User-inserted image

  1. When speaking is completed,,,

User-inserted image

  1. Code that was used for testing...

    User-inserted image

If your experiences differ, you must be using the Audio.sayEZB(). However, as noted above, Audio.Say() not unpausing after speaking will be resolved in the next update.

PRO
Australia
#10   — Edited

Very interesting. I think I found the cause. The sayWait command preceding the say command causes the VAD Skill to stay paused. If I delete the sayWait command, then the VAD Skill does unpause. Can you try this and see if you get the same result?

sayWait($Topic)
say($Text)[/b]
repeatwhile($IsSpeaking)
  ServoRandom( D0, 40, 140 )
  ServoRandom( D1, 75, 95 )
  ServoRandom( D2, 40, 120 )
  ServoRandom( D3, 100, 180 )
  ServoRandom( D4, 30, 50 ) 
  ServoRandom( D5, 130, 150 ) 
  ServoRandom( D6, 100, 130 )
  ServoRandom( D7, 45, 75 )
  sleep(2000)
endrepeatwhile
PRO
Synthiam
#11   — Edited

*note: I Edited your post an added the code tags so it’s properly formatted

There was a release tonight so that might have been resolved. Looks like the cause of the issue was identified earlier today and rolled into the update.

PRO
Australia
#12  

Further to my comments  above. I think the VAD Skill didn't unpause because the variable $Topic was null. So sayWait($Topic) was saying nothing. I just used an IF statement to avoid the sayWait if $Topic was null. The VAD Skill unpaused as expected,

PRO
Synthiam
#13  

Yeah that would have unknown behavior. The libraries expect some text to be spoken. The other options is ARC can throw an exception but that’s not a good design. I’d just make sure there’s some text to speak. Also make sure you upgrade because testing with an old version won’t make debugging easy:)