Bind a servo to spoken audio to move a mouth similating speaking
How to add the Talk Servo V2 robot skill
- Load the most recent release of ARC (Get ARC).
- Press the Project tab from the top menu bar in ARC.
- Press Add Robot Skill from the button ribbon bar in ARC.
- Choose the Audio category tab.
- Press the Talk Servo V2 icon to add the robot skill to your project.
Don't have a robot yet?
Follow the Getting Started Guide to build a robot and use the Talk Servo V2 robot skill.
How to use the Talk Servo V2 robot skill
This skill will bind to the Text-to-speech engine and move servos to simulate jaw movement when speaking. Whenever a text-to-speech script command is executed (i.e. Say, SayEZB, SayWait, SayEZBWait), this skill will move the specified servos to simulate a mouth movement. If your robot has servos connected to simulate a mouth, this skill will move those servos while speaking.There are parameters to configure for the voice and voice settings selection in this skill. Every voice and different voice settings (i.e. speaking speed) will require custom settings. The settings are delays for each type of audio. For example, there are delay specifications for Constants and Vowels. The mouth is closed when a Constant is detected and opened when a vowel is detected. The mouth is again closed at the end of a word or sentence. The delays for each of these settings can be specified to tune your effect.
Main Window

1. Text Display
Displays the text that is being sent by a script to activate the servo movement.
2. Pause Checkbox
When checked the talk servo skill will be paused and won't execute servo commands until unchecked.
3. Stop Button
This button will stop the servo movement at any time.
4. Script
A script must be used to activate the Talk servo skill. Use commands like Say, SayEZB, SayWait, or SayEZBWait to activate the servo movement.
Settings

1. Title Field
This field contains the title of the Talk servo skill. You can change it if you'd like.
2. servo Settings
This section allows you to set up servo movement parameters such as servo port, board index, servo configuration, max/min degree limitations, multiple servo control, and inverted direction.
3. Constant Delay Drop-down
For each consonant in the text being executed by this skill, the talk servo will go to the minimum servo value. The value in this drop-down determines how long the servo will stay in that position. The range is 10-1995 milliseconds. The default is 90 ms.
4. Vowel Delay Drop-down
For each vowel in the text being executed by this skill, the talk servo will go to the maximum servo value. The value in this drop-down determines how long the servo will stay in that position. The range is 10-1995 milliseconds. The default is 40 ms.
5. Period Delay Drop-down
For each period or coma in the text being executed by this skill, the talk servo will go to the minimum servo value. The value in this drop-down determines how long the servo will stay in that position. The range is 10-1995 milliseconds. The default is 300 ms.
6. Start Delay Drop-down
The text-to-speech engine and audio buffer have a slight delay before the audio begins to play. Use this drop-down to adjust the delay before the Talk servo movement begins. Use this delay to sync up the servo movements with the audio. The range is 10-1995 milliseconds. The default is 460 ms.
How to use Talk Servo
In this short tutorial, we will demonstrate how the Talk servo works when the robot is instructed to speak. Any control that uses the text-to-speech engine will cause the Talk servo robot skill to move the servo. This tutorial will use Blockly to have the robot speak and move the servo.
1) Attach a servo to the EZB controller on port D0
2) Add this Talk servo skill to your ARC project (Project -> Add Skill -> Audio -> Talk Servo).

3) Add a Script skill to your ARC project (Project -> Add Skill -> Scripting -> Script).

4) Press the config button on the Talk servo robot skill

5) The Talk servo config menu will display. Select the port for the servo. Also, specify the Min and Max positions for that servo. Press SAVE to save these configuration settings.

6) Press the Config button on the Script robot skill.

7) Switch to the Blockly tab

8) Expand the AUDIO section. Select one of the two blocks for having the robot speak. The Say EZB block will speak out of the EZB speaker (if supported). The Say PC block will speak out of the PC speaker.

9) Expand the TEXT section. Drag the text string and fit it into the Say block.


10) Edit the string to some text that you wish the robot to speak.

11) Save the script

12) Ensure you are connected to an EZB (required to move the servo). Now, press the START button on the script. Watch the servo move as the robot speaks your phrase.

Now that you have seen how the Talk servo works, you can have any robot skill that speaks move the servo. Take a look at the chatbot robot skills, such as AIMLBot, BotLibre or PandoraBot in the Artificial Intelligence section of the robot skill store.
Requirements
A servo motor and an EZB I/O controller.
Thanks,
Perry
The talk servo worked as expected, with the voice coming from PC speaker.Code:
When I used
The voice came from speaker in robot attached to EZB controller as expected but no movement from Talk Servo.Code:
I tried with an IoTiny and got the same result. Also tried with another PC and got the same result.
Hope this is clear. I have the most recent update of ARC. I’m a bit stumped, It was working all as expected correctly on previous update.
Many thanks
I use:
min = 1
max - 180
great to hear you got Talk servo V2 working
I use it all the time, here is my last video https://youtu.be/wcYgtyJCnvY
Thanks for your comments...
No, this time I used the Ezb4 controller, connected the LEDs to ground and signal to work
I used:
the Talk servo V2, fine tuning all the adjustments
audio toolbox for different voices and script
Script for the audio
5 LEDs
small servo for mouth,
wires,
tape,
EZB4 controller,
ARC,
servo city parts for stand,
mask, cut for the mouth
You can use the Arduino if you prefer, it works the same way with DJ's Arduino software.
On my Arduino I have a shield, easy to plug servos, LEDs or whatever into it. Also, I use an external power source for bigger servos.
COM 3. baud 57600