
Dunning-Kruger
Canada
Asked
— Edited
Here is a little project I have been working on with fellow forum member Bob Houston.... It was originally written by another forum member Louis Vazquez.... who really did a good job on this... I have tweaked it a little to try and make it more adaptable from project to project.... It works like sound servo, but using text to drive the servo instead of sound....
I have Luis' permission to post so here it is...
I have posted it to the cloud as well...
Hey Luis, I would be very interested in the version you are porting from C++... Your second version works very well indeed.... Awesome work dude....
I couldn't get your email link to work....
OK, here is my email. anyone in the community is welcome to contact me so long as it concerns robotic code and hardware. (thanks)
[email protected]
Also to clear up a questions above.
The "." is not need anymore as I am using the length of the string to read to end of line. I have a some code in there to check to see if the last letter left the mouth open and is so closes it.
The next time I get to work on the code , I will test the timing so that if a "." is used in the string. for instance two sentences in one string separated by a "." followed by a space. maybe the timing between sentences is a bit longer than between words. I will also check for things like a "," that may generate a pause in the speech and have a timing for that as well .
Maybe you guys and gals can help. I can use variables for setting the timings at the start of the script , what I can't see to do is set a Variable that represents a servo pin. anyone out there know how to do that?
That's a good idea Luis... maybe other variables such as for sleep delays as well?... in case the user wants to increase or decrease the speech rate....
Check your email when you have a chance...
@Luis, I've got this new code all set up now - It works great! Much more user friendly for entering the "text to speech". This is just what we needed. Playing around with the script I have found you can put other punctuation in the sentence, like "," "!" and "?" . Thanks again for you work on this project.
You're most welcome @bhouston .
I love you videos , keep it up!
Variable for the servo pin? As in the digital port it's on, right?
If so;
And
Unless DJ has changed it (again) that should work however it's not really good practice and DJ had removed the ability to do that in a previous update however it was added back in.
Nice work on this. It just saved me $59 on a board I was about to purchase for this purpose.
Thanks for sharing!
:) Any videos of this script in action?