Canada
Asked — Edited

Ibm Watson Services Plugin

The IBM Watson Services plugin created by @PTP currently allows you to perform Speech to Text and Text to Speech as well as visual recognition using Watson Services.

You can download and install the plugin here https://www.ez-robot.com/EZ-Builder/Plugins/view/251

Before you can use the plugin, you will need to apply for a free 30 day trial of IBM Speech to Text Account here https://www.ibm.com/watson/services/speech-to-text and a free 30 day trial of IBM Text to Speech https://www.ibm.com/watson/services/text-to-speech/

I will create some examples as it moves forward and try to answer any how to questions.

Thanks for creating this PTP, as with all your plugins this is an excellent piece of work and showcase of your talents.

User-inserted image


ARC Pro

Upgrade to ARC Pro

Synthiam ARC Pro is a new tool that will help unleash your creativity with programming robots in just seconds!

#9  

I'm experiencing an issue with the plugin. After running for about 30 minutes ARC will freeze up. According to windows the program is still responding, but effectively it is not. Ram usage also increases from around 300 mb to 600 mb. It only happens when listening is active . STT status doesn't make a difference. No other project controls or plugins are running. I can reproduce this error on a second pc in a different project.

Any thoughts?

PRO
USA
#10  

@larschrjensen

I fixed a memory leak. Let me know if the new version fixes the problem.

PRO
Canada
#12  

Thanks @ptp. I feel a little silly now. Worked like a charm. I was calling the VR from speech to text and then processing in the text to speech script and not creating a script after VR processed. User Problem :-)

#13  

@nink

Please send me a email, I wish to discuss something with you. My addy is in my profile.

Thanks

PRO
USA
#14  

The following posts are related to the Visual Recognition.

I took a picture of playing card (Seven of Clubs)

User-inserted image

Then i performed a few quick tests:

IBM Watson Visual Recognition Services:

User-inserted image

Microsoft Computer Vision API :

User-inserted image

Google:

User-inserted image

It's obvious these results don't help.

PRO
USA
#15  

Step 1: Create and train an image custom classifier:

I've used the EZ-Robot camera V2, it's important to use the same camera for training and recognition.

Using the ARC camera snapshot control, i took 10-15 pictures of each card (7,8,9,Jack,King) of Clubs.

User-inserted image

User-inserted image

It's important to test different light conditions, angles, orientations etc.

I created a zip file one for each card image folder.

then i run the following script:


#Don't use dash or symbols for class names
DefineArray($Classes,5) 
$Classes[0]="SevenOfClubs"
$Classes[1]="EightOfClubs"
$Classes[2]="NineOfClubs"
$Classes[3]="JackOfClubs"
$Classes[4]="KingOfClubs"

DefineArray($ZipFiles,5) 
$ZipFiles[0]="C:\Users\ptp\Pictures\My Robot Pictures\7-Clubs.zip"
$ZipFiles[1]="C:\Users\ptp\Pictures\My Robot Pictures\8-Clubs.zip"
$ZipFiles[2]="C:\Users\ptp\Pictures\My Robot Pictures\9-Clubs.zip"
$ZipFiles[3]="C:\Users\ptp\Pictures\My Robot Pictures\Jack-Clubs.zip"
$ZipFiles[4]="C:\Users\ptp\Pictures\My Robot Pictures\King-Clubs.zip"

ControlCommand("IBM Watson Services", CreateClassifier, "PlayingCards", "$Classes", "$ZipFiles")

This will upload the images files and will create a Custom classifier name: PlayingCards with 5 classes (SevenOfClubs ... KingOfClubs)

The training will start after the upload, can take a few minutes, depends on the number of classes, pictures, picture size etc.

PRO
USA
#16  

Step 2: List the existent custom classifiers and their status e.g. Ready, Training.


ControlCommand("IBM Watson Services", GetClassifiers, "$Classifiers" )
$NumOfClassifiers=GetArraySize("$Classifiers" )
print("Found " + $NumOfClassifiers + " classifiers")

IF ($NumOfClassifiers>0)
  REPEAT ($ix, 0, $NumOfClassifiers-1, 1)
    $ClassifierId=$Classifiers[$ix]
    print("ClassifierId=" + $ClassifierId)

    ControlCommand("IBM Watson Services", GetClassifier, $ClassifierId, "$ClassifierInfo", "$ClassifierClasses" )
    print("...Name="+$ClassifierInfo[1])
    print("...Status="+$ClassifierInfo[2])
    print("...CreatedOn="+$ClassifierInfo[3])
    print("...Errors="+$ClassifierInfo[4])

    $NumOfClasses=GetArraySize("$ClassifierClasses" )
    print("...Found " + $NumOfClasses + " classes:" )
    REPEAT ($cx, 0, $NumOfClasses-1, 1)
      print("......" + $ClassifierClasses[$cx])
    ENDREPEAT

  ENDREPEAT
ENDIF

is training:

User-inserted image

running again the same code:

User-inserted image

it's ready to be used.