Asked — Edited

Text To Servo Speech Engine

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...

Textservotospeech.EZB

I have posted it to the cloud as well...


ARC Pro

Upgrade to ARC Pro

Unlock the true power of automation and robotics by becoming a proud subscriber of Synthiam ARC Pro.

#9  

@Rich... not anymore Luis modified it... only stipulation is a period has to end each sentence or phrase... Only need two lines...


$sent = "This is a test of something for the robot to say."
ControlCommand("New Text Speech Engine", ScriptStart)

#10  

Of course you need to adjust the sleep and servo commands in the script to work with your particular project...

United Kingdom
#11  

Presumably the period is picked up somewhere in the code (I've not read the code yet) and that tells it that it's the end of the sentence?

If that's the case you could get the string length and use that to find the end of the sentence etc. I'm just thinking of problems when exclamation marks and question marks are used. Or no period at all.

#12  

@Rich... I am sure Luis will (hopefully) keep tweaking the code.... As you are right the code is looking for a period to denote the end of a sentence... So it probably will have to be tweaked for the reasons you mentioned... Also, I noticed commas are not picked up as a slight pause...

Given what Luis has written here the code as it stands... dare I say it, works better than sound servo...

United Kingdom
#13  

Define better;)

SoundServo is volume driven and works fine for that. But it doesn't move a mouth as many desire. This has been something others have contacted me about in the past but I've had no time to spend on the script for it (so glad someone else has stepped up:))

#14  

I am familiar on how to adjust the sound servo control to suit my needs... And it does work quite well.... The main difference that I see with Luis' code is it seems to mimic speech better... This of course just my opinion and is based solely on my inMoov project an nothing else... Comparing the same sentence "side by side" if you will, the text to speech engine to me seems more fluid and realistic dynamic when compared to sound servo...

On a side note my girlfriend (who's entire extent of robotic knowledge is based on my blabbering to her constantly about my robot projects) without prompting a head of time picked Luis' code as the more realistic mouth movement....

Sound servo of course is much easier to use and integrate into projects... For that reason most people will still prefer to use. Not to mention, it works very well....:)

#15  

Actual in the new revision you do not need the ending .

Also ran a version of the script that does short vale sound like to have a half open option. this would make the voice even smother. I opp-ted to upload the one using 2 position only because that's what bob was needing.

I am working on a version that uses phonetics written in C++ , but I will port it over to ez script when complete and working.

I like the sound servo OK but it move on any sound. This script if more for text to speech rather than reacting to any sound played to the card.

Also I would like to know if you had to play with any timings on the script or did it work out of the box. And if you did change things, what did you have to change. I'm going to work on making these items variables at some point.

Luis A. Vazquez

try this [email protected]

#16  

Quote:

Sound servo of course is much easier to use and integrate into projects... For that reason most people will still prefer to use. Not to mention, it works very well

One huge difference though it that sound servo will react to any sound, not just speech, so I can see a lot of value in this scripted method.

Alan