
frankcottnj
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 )
frank
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:
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:
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
. 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...
@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:
@frankcottnj
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?