Asked — Edited

Ezbsay() And Say()

Why is it my pc sound card works off the say script but I don't get any sound off the sayezb script. I wrote script and when I changed all the

sayezb (" I see a")

to just the sound board

say("I see a")

it only works out of the soundboard. Also the ez robot speaker does work and tells me when wifi connection is made. I did look and search for this but didn't get any answers. I also get this when I try to use the ezb to speak: " Error on line 7: Cannot change synthesizer's output while speaking. " I also tried the speech synthesis window and when I click for the ezb to speak, nothing comes out, only works with pc sound, Here is the error I got window

Speech Synthesis Error (SayEZB): System.InvalidOperationException: Cannot change synthesizer's output while speaking. at System.Speech.Internal.Synthesis.VoiceSynthesis.SetOutput(Stream stream, SpeechAudioFormatInfo formatInfo, Boolean headerInfo) at System.Speech.Synthesis.SpeechSynthesizer.SetOutputToNull() at System.Speech.Synthesis.SpeechSynthesizer.SetOutputStream(Stream stream, SpeechAudioFormatInfo formatInfo, Boolean headerInfo, Boolean closeStreamOnExit) at System.Speech.Synthesis.SpeechSynthesizer.SetOutputToAudioStream(Stream audioDestination, SpeechAudioFormatInfo formatInfo) at EZ_B.SpeechSynth.SayToStream(String msg) at EZ_Builder.UCForms.FormSpeechSynthesis.ARQMA3s6X6c(Object , EventArgs )



Upgrade to ARC Pro

Harnessing the power of ARC Pro, your robot can be more than just a simple automated machine.


I am unable to check your script at the time, but make sure that your updated to the latest ARC as there was some fixes recently.


you can also remove ARC and install back

sayEZB("hello my name is jd")


Make sure that you don't have a Say command and a Sayezb command in the same script. They all have be one or the other. Posting your script will help trouble shooting it.


Try using SayWait and SayEZBWait. What is probably happening is that the say commands are occurring one right after the other with no time in between them. The "Wait" part of the command will cause the script to not execute the second Say command until the first is finished. Right now, the second is trying to interrupt the first because it does not wait until the first is done.

EDIT: If you do this:

Say("Hello there human")
SayEZB("Hello there human")

They will both come out of the robot. Oddly, if you reverse the statements, they will come out of both the PC speakers and the Robot at the same time.

If you use Wait on at least the first one, They will come out of each one at a time:

SayWait("Hello there human")
SayEZB("Hello there human")

If you had another Say statement after the second, you would need to put a Wait onto the SayEZB statement as well so the second one would not interfere with the third one. Gets a bit complicated.

So the rule seems to be, if you want the speech to come out of both the PC speakers and the robot speaker at the same time, do not use the Wait and always have the SayEZB go before the Say. If you want the speech to come out of one then the other, use the Wait on at least the first one. The order doesn't matter then.

BTW, if you put a space between the right quote mark and the right paren, you won't get that smiley face showing up instead of the right paren. Like this: With no space: sayezb (" I see a") With a space: sayezb (" I see a" )


Or, you can recommend that he uses the code tags :). I don't know why some people refuse to use code tags, they're right there beside the editor :D. Edited his post for him, see how much nicer it is now frank!

As for the original post, why does he mention the soundboard? I wonder if he's trying to put the Say() command in the soundboard as an action? Because that won't work, you cannot play two sounds at once - i.e. speaking and music with the ez-b v4. Maybe that's what he's having issues with.


This combination works for me without issue...

 sayezb("docking successful")
 saywait("docking successful")


@Richard R

Right. That's basically the same as having both without the Wait added since the saywait isn't doing anything different as far as the interaction of the pair is concerned. It's wait is only effective in relation to whatever came after the saywait statement. In this case nothing does so it acts the same (simultaneous speech from the robot and the PC) as it does in this variation:

sayezb("docking successful")
say("docking successful")



I was wondering. How did you get those error messages between the asterisks in your original post? They look more like messages C# might generate than the script language. Are you actually working with C# as opposed to the Script language?


Thanks everyone for the guidance. Even with just one line of script to have the ez b speak, I get nothing. I also ran the speech synthesizer settings and where the option is for pc sound or ez b, only the pc sound works. The error messages I got from the window that came up telling me status of the script. This occurs only when I use the sayezb script not the pc sound script of say.

I will uninstall the program and install it again to see if this fixes it. I also had some freeze issues and the program stopped working. Should I also clean out the registry? I have Windows 8.1


Hmmm - can you share the project? It would help to see where the script is being executed. There was mention of a SoundBoard as well. If you can post the project here, we can take a look :)

United Kingdom


Follow DJ's suggestion and post your project here using the "Upload file" tab on this page then hit "upload" then "Send". Or save it to the Cloud and tell us what the name of your project is called so we can investigate for you.


Ok I am uploading the project. But I think it's a problem with either a reinstall or update because I started a black project and the ez board still had no sound when I went into the speech synthesizer.

I reinstalled the latest program and now I had about 6 crashes. Will restart computer and see what happens. MrStemAIProject.EZB

United Kingdom

Well, I don't know what to tell you, other than the project works for me no problem at all. It doesn't crash, and the "Say (EZB v4)" Speech Synthesis control works fine when typing in a phrase and having it speak through the EZ-B. Even changing the setting in the pandorabot control to speak through the EZ-B speaker works okay. I also added a script to the project and used SayEZB("Hello there.") and it worked as it should.

Other than installing the latest version of ARC (released a few hours ago), try the full computer restart as you mentioned, and see what happens.


I did the reinstall and used the latest version and still I don't have the ezb speaking. I do hear a fuzzle noise coming from the ezb and I will try to do this on another pc to see if the problem is my Toshiba L75 laptop. I hope it's not the ezb because I waited over a year before I finally got to try it and it's not under warranty. Oh well, my problem. I will take a laptop from the school home running Windows 7 to see if the unit works properly so I can pinpoint the problem. I also have an issue when the "today's news" rss is on, the script won't execute to stop it unless I go to the script window and run it manually. Maybe this has something to do with Windows 8.1.

thank you for assisting me. fc


I tried to go into the windows speech files and delete them to see if the speech synthesizer problem spoken of can be fixed. I am the local administrator but windows won't let me delete these files. I can't take ownership too. It seems that there may be a problem with my windows 8.1 I will have to try another laptop to see if my program works then if it does, I don't know what to do from here



Does your EZ-B make noises - such as a bootup sound when power is applied? Or a connection sound when ARC is connected?

What does the sentence "script won't execute to stop" mean? Can you expand on that?

Also - let me look at your project and get back to you...

United Kingdom

Deleting Windows speech files will help you with your issue if you're hearing a voice speak through the PC/laptop. The Windows 8.1 fix is for using third party voices where some users can only use the default voices that comes with Windows.

Try another machine like you say, and report back here with the results. Good luck.

BTW, you say about stopping the RSS news script. Do you mean to stop it talking? If so, you will need to add a new script control or phrase in the speech rec control, and add the following script...



He did mention that the EZ-B does have sound...


Also the ez robot speaker does work and tells me when wifi connection is made.


In your project, i would highly recommend paying attention to blank lines in quotes. Any characters inside a quote are incredibly important to the function.

For example if                                         I toldyou to dosomething and i                                                                                                       usedspaces inco                                                  rrectly                                                                    youwould have                                                                                                                                                                 trouble under                                                                       standing me, right?

Well, that's what this does to the software...


SpeakRSS( " " ) SpeakRSS( "" )

Notice how the second command in your speech recognition has a space after the quote and before the https...? That is an invalid URL. I notice you might be a little spacebar happy:D :D. There's a lot of spaces inside of quotes all over the place in the project. This will of course, return errors and produce unusual results. Pay attention to blank spaces inside of quotes, because that can cause issues.

That space wouldn't be an issue for the speech synthesis, but it is a habit you should kick in the butt now before it turns into future frustrations :D

All of the speech recognition and PandoraBot controls are set to use the PC Speaker, not the EZ-B. This leads me to wonder if you have the volume turned up on your computer?

Lastly, the Connection Control has a very broken script with orphan Semicolons just hanging around... Again, those shouldn't be there and also giving you errors


SpeakRSS("";, 1 ) SpeakRSS("";, 3 )

The entire project is really full of syntax errors with blank spaces or strange random characters in code...

Maybe turn up the volume on your computer speakers and try it again:D Oh, and fix the code!


Uh oh - okay, this is the last advice, maybe...

The speech recognition has commands to "detect faces" and colors - however, there is also a large amount of code in the Tracking Start of the Camera Control. So both are detecting the same thing? The commands are similar and there's a logic overlap - i am unable to predict the behavior of how what the outcome would be because, but i will recommend that you choose to use one or the other. Meaning, use your detection in a script outside of the Camera, or use the script in the Tracking Start of the camera - either way, pick one. :D


Eak okay - and in the Tracking Stop script of the Camera Control is...

ControlCommand("PointAndTrack", ScriptStop)


There is no PointAndTrack script... so that will cause errors in the camera control.

Maybe your robot is trying to talk, but the recursive logic is creating infinite loops of stuff. Can you start with a blank project and add the Speech Synthesis control? Just use that and see what your outcome is...

Also, turn your volume up :D

User-inserted image


Thanks DJ, that may do the trick. Also I noticed the ezb is not connecting until I manually connect it. Ok I saw what is happening, I have to manually connect the ez b controller, then the scripts now work out of the ez b when using the sayezb command. Finally, thank you. Now I can start the next step hip hip hooray! Love this community. frank

United Kingdom

So all this time the EZ-B wasn't actually connected to ARC? That explains why you couldn't hear any of the SayEZB() scripts out of it. Glad you figured it out. :)


@frankcottnj What do you mean manually connect? Do you mean typing in the ip address as opposed to using the scan tool? The ezb does not auto connect to ARC (not currently, anyway) you have to use the connection control to either type in the ezb's ip address manually or use the scan tool (the antenna looking thingy) to locate the ezb on your network (if in client mode that is) and then click connect... The flashing blue or green led on the ezb will change to solid if it is connected to ARC...


No prob man! Glad to hear it's all good to go. We all get confused or overwhelmed sometimes. Man, the other day I spent an hour trying to get my mouse to work when I finally realized the batteries were in backward. Ha, not always easy being human - but at least it's an adventure!


Richard, I thought when you run the sayezb script it does the connection. I had to go the the connection window and click connect, then the script runs. Sorry folks I just started this a few weeks ago and I apologize. Anyway look at the awesome great support DJ and all of you have. This community is awesome!



@Frank... no worries... we're all beginners at one time or another...

Cheers :)