I have the finger starter working independently of myrobotlab but would like to now use the software to control the finger with speech before printing out more parts :)

I am using an arduino uno using port 5 and pin 3 for the finger

I am using this inmoov script below the only modification was to change to the port from 8 to 5 - in the python tab I think I should see listening but the tab is blank

However when I review the java tab from the start I do see some concerning messaging

i01_ear = Runtime.getService("i01.ear")

107131 [gui] WARN  class org.myrobotlab.framework.Service  - GUIService.registered(Sphinx) :  NoSuchMethodException - attempting upcasting

Python script  used :

# a very minimal script for InMoov
# although this script is very short you can still
# do voice control of a right hand or finger box
# for any command which you say - you will be required to say a confirmation
# e.g. you say -> open hand, InMoov will ask -> "Did you say open hand?", you will need to
# respond with a confirmation ("yes","correct","yeah","ya")
 
rightPort = "COM5"
 
i01 = Runtime.createAndStart("i01", "InMoov")
# starting parts
i01.startEar()
i01.startMouth()
#to tweak the default voice
i01.mouth.setGoogleURI("http://thehackettfamily.org/Voice_api/api2.php?voice=Ryan&txt=")
##############
i01.startRightHand(rightPort)
# tweaking defaults settings of right hand
#i01.rightHand.thumb.setMinMax(55,135)
#i01.rightHand.index.setMinMax(0,160)
#i01.rightHand.majeure.setMinMax(0,140)
#i01.rightHand.ringFinger.setMinMax(48,145)
#i01.rightHand.pinky.setMinMax(45,146)
#i01.rightHand.thumb.map(0,180,55,135)
#i01.rightHand.index.map(0,180,0,160)
#i01.rightHand.majeure.map(0,180,0,140)
#i01.rightHand.ringFinger.map(0,180,48,145)
#i01.rightHand.pinky.map(0,180,45,146)
#################
 
# verbal commands
ear = i01.ear
 
ear.addCommand("attach right hand", "i01.rightHand", "attach")
ear.addCommand("disconnect right hand", "i01.rightHand", "detach")
ear.addCommand("rest", i01.getName(), "rest")
ear.addCommand("open hand", "python", "handopen")
ear.addCommand("close hand", "python", "handclose")
ear.addCommand("capture gesture", ear.getName(), "captureGesture")
ear.addCommand("manual", ear.getName(), "lockOutAllGrammarExcept", "voice control")
ear.addCommand("voice control", ear.getName(), "clearLock")
 
ear.addComfirmations("yes","correct","yeah","ya")
ear.addNegations("no","wrong","nope","nah")
 
ear.startListening()
 
def handopen():
  i01.moveHand("left",0,0,0,0,0)
  i01.moveHand("right",0,0,0,0,0)
 
def handclose():
  i01.moveHand("left",180,180,180,180,180)
  i01.moveHand("right",180,180,180,180,180)

 

pedrosenarego

8 years 3 months ago

what build your using ? the latest? i think that script only works for older versions! try download 1.109 for that script, or get a script more recent! 

I think you can get on git 3 new scripts for the new versions

Thanks for the reply MoVo

Apologies I am new to mrl

FYI and my thought process

I followed the link button in mrl for downloads which points here :

https://github.com/MyRobotLab/myrobotlab/releases/tag/1.0.119

If i go to runtime and system to check for updates there are no new ones offered

I can update from Pedros point that i did need a new script posted by Gael which had been verified on version 1.0.107

I went ahead and tested with 1.0.119 as a test and the finger test "worked" although there was no audio 

Checking previous posts I reviewed where the audio was stored and found that windows media player, and VLC would not play the files

I can see the file called in the running script below - however as an example444bcb3a3fcf8389296c49467f27e1d6.mp3 will not play manually and suspect this is why I am not hearing any audio

419972 [i01.mouth] INFO  org.myrobotlab.service.Speech  -

audioFile\google\en_gb\audrey

\444bcb3a3fcf8389296c49467f27e1d6.mp3 is found
419973 [i01.mouth] INFO  org.myrobotlab.service.Speech  -

isSpeaking true
419975 [i01.mouth] INFO  org.myrobotlab.service.AudioFile  -

started
419975 [i01.mouth] INFO  org.myrobotlab.service.AudioFile  -

stopped
419975 [i01.mouth] INFO  org.myrobotlab.service.AudioFile  -

stoppedFile

 

I have reviewed version 1.0.107 and see the audio files have english names and do play as normal mp3 with no codec issues reported

My question should I use 1.0.107 is there a known fix for 1.0.119 or should I really be using much later 1.0.1409 ?

 

 

 

Thanks Pedro

When you say "changed the MP3 files for the new ones with the same name" where are they located ?

I get the the hang of this soon :)

Andy

pedrosenarego

8 years 3 months ago

In reply to by andrew71

I created some new ones! with a software and named them for the same name and replace! 

For exemple for "did ou said open Hand" i create a mp3 saying the same and substitute in the paste of the audio, audrey i think thats the name. 

When you run the python script, when he try fetches the audio you can see the name of them associated to what they should say.

 

But have in account that in latest builds of MRL you dont need this, the new service used is the Acapela, which create the mp3 in real time when the script runs