EZB Connect By Name icon EZB Connect By Name Discover EZB WiFi controllers by name, auto-bind connections, avoid IP management; live discovery and multi-EZB support for ARC. Try it →
Australia
Asked

I'd Like To Pause The VAD Robot Skill

@Athena I was about to write some code to pause the VAD Skill so that it wasn't executing its script at the wrong time. But I found there is no ControlCommand to pause or unpause this skill.



Related Robot Skill (view all robot skills)
Real-time microphone VAD using FFT to detect speech start/end and trigger scripts, with live level graph and sensitivity tuning

ARC Pro

Upgrade to ARC Pro

ARC Pro is more than a tool; it's a creative playground for robot enthusiasts, where you can turn your wildest ideas into reality.

Author Avatar
PRO
Synthiam
LinkedIn Thingiverse Twitter YouTube GitHub
#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.

Author Avatar
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
Author Avatar
PRO
Synthiam
LinkedIn Thingiverse Twitter YouTube GitHub
#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.

Author Avatar
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,

Author Avatar
PRO
Synthiam
LinkedIn Thingiverse Twitter YouTube GitHub
#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:)