Asked
— Edited
Hi guys! I have successfully created a robot bear, but I am having some problems.
- He doesn't listen to voice commands
- When he talks, the servo will not stop after he is done. It is a 360 degree servo, and I have tried to get him to talk through scripts and the talk servo. He successful starts moving his mouth, but it will not stop when the audio is done.
- Finally, I would like to know how to get him to sing to mp3 music.
I could really use some help, it's my first robot. Thanks!
I decided to go with the 180 servo. And starting out, I would like to use the sound board ezb.
You could use the "Talk Servo" control and set your bears mouth servo up, then add the "Soundboard EZB" and add your MP3, and sing along with SayEZB() commands.
Another way could be to use the servos minimum and maximum positions in a script to make the mouth move for the length of time the singing parts last for, using sleep() commands or changing the servo speed to match the words and pauses being sung to make the mouth move faster or slower depending on what's being sung, which would make it more natural looking.
Follow the "Your First Dance" tutorial to get an idea of how to edit and add script within a music track. Hope that all makes sense.
Ok I'll try it and see how it goes. Thanks so much!
No problem. It's hard to give you a script example, as it would depend on the song, lengths of time for the singing parts, and what words are being sung (for the more natural look). Good luck, and keep us posted on your progress... maybe even a short video if you're game.
Hmmm... it doesn't seem to work.. is there like generic code I could work off of? Sorry about that. I'm very new at scripting.
Actually thinking about it, using the talk servo control to sing along to an MP3 won't quite do what you want (I was thinking of using speech synthesis to sing along over the MP3, but that's not what you want and wouldn't work very well. Sorry about that). If I understand correctly, you would just like the mouth to move with a song being played.
So that being the case, the second option in post #11 would be the one to use. Use something like...
This would go at the starting points of any lyrics being sung on the MP3 track. Add more mouth opening and closing script lines, and change the length of sleeps to go with what is being sung. It may take a while to go through the whole song, but once you get the first verse or chorus of the track right, you'll have an idea of what to do for the rest. Hope that helps a little.
Thanks so much! I will try it out!
SUCCESS! Thanks so much!