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.
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.
Note: click i01
anytime you want to return to the InMoov UI.
Click on the highlighted circle to access controllers
- 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.
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
.
Now we will start the head. Click the head icon > click on
.
- While here make sure that the
Mouth Control
is set tooff
. We no longer need this if using audioPeak for our jaw.
Now click on the i01.head.jaw
and select your Controller
and Pin
, then hit Basic
.
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.
- Set a smaller/safe range of limits >
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 theRest
button to bring it back to the rest position.
Now click on the speech icon > select Speech Service Type
> Scroll down to LocalSpeech
and click Set Speech Type
> click on
.
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.
Click the python
tab on the left. Open a new
script.
Give it a name.
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.
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
.
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')
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
andpeakMultiplier
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
besideAPI:
orToken:
. - 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
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.
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!
It is important to remember that Maryspeech is evil
and will NOT work well for your jaw.
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. :)
終り