Congratulations Rich, for answering the question and has received an EZ-Credit award! Share what you have learned and create a tutorial to help others by clicking here.

Script To Change Voice In Ez-builder.

Assistance Requested

Help Anthony with their question and receive $10 of EZ-Credit to get more robots and parts from our store. The following information was provided about their previous efforts searching tutorials for a resolution.

Anthony claims to have checked these sources:

I have some voices with different accents. Spanish, British, Greek etc. I want to script it so when I ask LeXI to say something in another language the script will switch the voice to the other voice, say what was asked and return to her original voice...Rich I think this is up your alley.

I have found a few conversations, tutorials and activities that may help with your question. Take a look at these links. I've sorted them by what I believe to be most relevant but that is not always the case as I'm still learning.

Also, consider reviewing the Learn section for informative lessons and activities. Check it out!


EZ-Script's ControlCommand cannot change the voice synthesis settings.

One way around it would be to have different projects for different voices, you would need to use a voice command to initially switch the project to another one, then speak the voice command which requires the foreign reply, then receive the answer with the different voice settings and finally switch back to the standard project. A rather complex and messy solution.


Excellent work around!


I'm just spitballing, and someone correct me if I'm wrong, but I think we may have found a valid reason to use the SDK over EZ Builder. With it being C# (My pref) one would think that you could interact with windows as well as the EZ using the SDK. Just a thought. Please, correct me if I'm mistaken.


I wouldn't call it a valid reason to switch to the SDK to be honest. Think about it, every control in the project would need to be re-written in the SDK, so all servos, all camera controls etc. just to change the voice. It is a lot of work.

There may be third party applications that can control EZ-Builder and be used to change the voice. Something that can run a macro to emulate mouse movement and change the voice settings. Something like EventGhost which can emulate the mouse. On receiving an event via telnet it takes over control, moves the mouse to position x,y left lick move to x,y left click again and voila, the setting has changed. It does mean using another application along side EZ-Builder though.


If you could get that working, LEXI could be a schizophrenic (I may be spelling this wrong) and have multiple personalities.

She could say "I'm a schizophrenic and so am I."

Really, I make fun, but it is no laughing matter. I am married to one. She is a wonderful person.


@Rich, I knew you'd have a better answer lol Smile You Da Man!


You spelled it right!
I give you credit for mentioning "Schizophrenic", I sure wish you the best with your situation, and I respect you.
I can relate to you, because we have an adult son with that terrible disease (College degree, extremely smart, and creative.)
We attend monthly NAMI support meetings, to help him and us.

aameralis: That is a very good request. I always like expanding EZ Robot horizons.

Thank You,
Steve S


@rich ok for test purpose I made 2 scripts. 1 called (talk1) and (talk2).saved each script individually as talk1.ezb and talk2.ezb. each script contained only 1 line of command. 1 say("I speak English"Winky for talk1 and 1 say("I speak Spanish"Winky.
each ezb file ad the voice changed. now the 3rd script was a speech recon script. asking do you speak English? and command was to loadproject(talk1). and the same for Spanish. now the load the project, how doi have it run the script when it opens?


Have it run when connection is established and it'll run on project change.

Click the gear icon on the connection control to open the options.
You have space for a script for each connection.
Either enter the whole script in there or use a ControlCommand to run the script if you have it as an EZ-Script control.