Canada
Asked — Edited

Script To Activate Bing Speech Recognition

I've got the Bing Speech Recognition working and WOW it's great! I have been trying to come up with a script that will activate it - so I don't have to click on the Start and Stop Recording tab - no luck. Is something like this possible? Also, can Bing Speech be coupled with the Talk servo Control? Thanks


ARC Pro

Upgrade to ARC Pro

Stay on the cutting edge of robotics with ARC Pro, guaranteeing that your robot is always ahead of the game.

#42  

Thanks DJ, I've been playing with it but still not luck. I was thinking that I should be able to use something like;


ControlCommand("Speech Recognition", SetPhrase, $BingSpeech)

but I get an error due to the SetPhrase to replace;


ControlCommand("PandoraBot", SetPhrase, $BingSpeech)

PRO
Synthiam
#43  

You can find out about ControlCommand() by clicking on that word. It's highlighted in this response.

All commands that are available for a control are displayed in the Cheat Sheet. If a command, is not displayed, it doesn't exist.

The command SetPhrase does not exist for the Speech Recognition control.

I can add it - because i see what you're attempting to do. However, be aware that the bing speech recognition will recognize any phrase, including a period at the end of the statement, or a question mark. So your existing speech recognition will not work without removing the period or question mark from the $bingspeech variable.

I'll add the SetPhrase for ControlCommand() in the next ARC release.

In the meantime, the IF condition's i'm referring to is coding. For example, this is what my video uses for the script in the bing speech recognition plugin...


if ($BingSpeech = "What do you see?")

  ControlCommand("Microsoft Cognitive Vision", Detect)

ELSEif ($BingSpeech = "Hello.")

  ControlCommand("Auto Position", AutoPositionAction, "Wave")

  ControlCommand("PandoraBot", SetPhrase, $BingSpeech)

ELSEif ($BingSpeech = "Take a seat.")

  ControlCommand("Auto Position", AutoPositionAction, "Sit Down")

ELSEif ($BingSpeech = "How am I feeling?")

  ControlCommand("Microsoft Cognitive Emotion", Detect)

ELSEif ($BingSpeech = "How do I feel?")

  ControlCommand("Microsoft Cognitive Emotion", Detect)

ELSEif ($BingSpeech = "Say hello.")

  ControlCommand("Auto Position", AutoPositionAction, "Sit Wave")

ELSE

  ControlCommand("PandoraBot", SetPhrase, $BingSpeech)

endif

#44  

Hi DJ, I didn't explain what I was doing very well but I figured you would get it. I knew why the SetPhrase wasn't working. Thanks for the sample of the code it helps a lot. Looking forward to the next update.

PRO
Synthiam
#46  

Yes. Read about the ControlCommand so you can see what commands are available. You can see for yourself what commands are available for a control.

I prefer the right click method rather than cheat sheet. But it's up to you.

#47  

Yep, first thing I did was look at both of thouse methods looking for this new command. Theses options were listed under Speech Rec for both right click and cheat sheet:

User-inserted image

Am I looking in the wrong place? confused

#48  

@Dave... Are you asking this for Bing speech plugin or the built in ARC speech rec? What you posted is for the built in speech rec control...

EDIT never mind I just re-read part of the above thread...