Skip to content

CyberSyntek/i01InMoovIntro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 

Repository files navigation

Welcome to the intro to i01 InMoov services in MRL.

Intro

I'm kind of working backwards here, so some of the how-to basics is worked into audioPeak Jaw movements for now.

More updates will be added to this page eventually.

audioPeak Jaw Movements

Here is a video tutorial on audioPeak for those interested in having the visual examples. click image below

Click the thumb which will launch the i01 InMoov UI.

001-i01thumb

Note: click i01 anytime you want to return to the InMoov UI.

Click on the highlighted circle to access controllers

002-i01UI

  • If you are using the V1 Head you will be using Controller Left by default.
  • If you are using the V2 head or something different, you can use Controller 4 as there is no default yet.

003-ControllerSelect

Alternatively, you can start services such as Arduino from the runtime tab.

Enter a name (Anything you want to name a service) > Select Type of service > start service.

004-RuntimeServiceStart

Now we will start the head. Click the head icon > click on.

  • While here make sure that the Mouth Control is set to off. We no longer need this if using audioPeak for our jaw.

005-Headui

Now click on the i01.head.jaw and select your Controller and Pin, then hit Basic.

006-JawServo

Depending if this is your first time setting up a servo or not... click Limits to open the limits section you see in the image.

  • Adjust your output limits to whatever your jaw limits need to be.

  • I will write a calibration section to this tutorial eventually, but for now......

    • Set a smaller/safe range of limits > Control > attach to power > widen limits slowly until a desired and safe range is achieved.

NOTE: Your jaw limits will NOT be the same as mine as my jaw mechanism is not standard InMoov.

  • Set your Rest position with the orange slider. You can click the Rest button to bring it back to the rest position.

007-JawLimits

008-JawEnable

009-ServoPowerRange

Now click on the speech icon > select Speech Service Type > Scroll down to LocalSpeech and click Set Speech Type > click on.

010-MouthSelect

Now i01.mouth will be working so click on that to see its UI. You try copy/pasting the text below into the text area and hit speak.

Hello. I am the voice of David from Microsoft's local speech. This is an example of me speaking.

011-MouthTest

Click the python tab on the left. Open a new script.

012-Python

Give it a name.

013-PyScriptName

Copy/Paste this into the script you just created.

i01_head_jaw.subscribe('i01.mouth.audioFile', 'publishPeak', 'moveTo')

Now hit execute and that will have subscribed your jaw to i01.mouth.audioFile.

NOTE: Technically your jaw is working now with audioPeak, but... we haven't adjusted anything yet.

  • It will barely move and won't look good. Don't worry about moving it yet.

014-SubscribetoJaw

Now click runtime > safe config > name your new config setup (Whatever you want) > click ok.

  • Now your config will be saved to access anytime you want in the future.
  • You will see it displayed in Configurations in this window > select your config from it > start.

015-SaveConfig

Now click back to the python tab and copy/paste the following in and hit execute.

import org.myrobotlab.service.config.AudioFileConfig as AudioFileConfig

config = AudioFileConfig()
config.peakDelayMs = 300            #JAW SERVO DELAY ADJUSTMENT: If you need to delay the servo to line up with audio.
config.peakMultiplier = 250.0       #JAW SERVO OPEN/CLOSE RANGE: How much the mouth can open.
config.peakSampleInterval = 1.0     #JAW SERVO SENSITIVITY: How frequently the servo can respond to the audioPeak. 
i01_mouth_audioFile.apply(config)

i01_mouth.speak('hello, this is a test of the peak from mouth audio file')

016-TestingJaw

Your jaw should be working much better at this point.

Now you can adjust the figures until you are happy with the output your jaw is producing.

  • I suggest leaving peakSampleInterval = 1.0 as is as that will give you the best results with a servo.
  • It can also be helpful to reduce your jaw's speed a little bit. For example, I often have my jaw set to 170.
  • Different speeds will require different peakDelayMs and peakMultiplier adjustments for ideal movement.

Once you are happy with your jaw's movements, return to the runtime tab and save config.

NOTE: Your results will also depend on the mouth AKA Text-to-speech you are currently using.

  • I suggest using LocalSpeech because it works without anything else needed.
  • You can use Amazon Polly or NovelAI if you have an account and enter in your API in the i01.mouth.yml beside API: or Token:.
  • Avoid MarySpeech with audioPeak. (More details below)

Anytime you save config a new folder with whatever you named your config will be saved in MRL1.1.****\data\config

017-DataConfig

You can see here in the i01.mouth.audioFile.yml that the settings we saved from python successfully saved to our config.

  • You can also change them from i01.mouth.audioFile.yml while MRL is shutdown if wanting.
  • All your services will be like this and listed in your config folder.

018-SettingsSaved

audioPeak: Side note

Anytime audio is being played, you can click i01.mouth.audioFile and be able to see the bar at the bottom sample the audioPeak.

  • Our servo will follow this pattern as well!

019-AudioPeak

MARY IS EVIL!!!

It is important to remember that Maryspeech is evil and will NOT work well for your jaw.

EvilIsMary

You can test out Mary's evil if you would like by clicking back to i01.mouth.audioFile and watch a CONSTANT FULL BLUE BAR whenever audio is played.

  • Or take my word for it and just avoid the evils of Mary. :)

終り

About

This is an intro to the i01 InMoov services in MyRobotLab (MRL)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published