
I'm just not finding what I'm looking for so I have two questions I need to ask:
1.) I want to be able to pause speech recognition for the duration of a sound file being played and I don't want to specify the amount of time. For example if I play a sound file and want to pause the speech recognition for 9 seconds I know I can do it like so:
ControlCommand( "Speech Recognition", PauseMS, 9000)
What I want is something more like:
#this plays a song from my Music sound board
ControlCommand("Music", Track_0)
ControlCommand( "Speech Recognition", Pause, until end of Track_0)
Is that possible?
2.) When you play a random track, is there a method to grain the value of the random track? For example this will play a random track from my sound board:
ControlCommand("Answer to Bender", Track_Random)
I've noticed the Track_Random often selects the same track. What I want to be able to do is discover the number of the random track - use the value to set a variable - then use that variable to ensure a different track is select the next time the script is ran. It doesn't look like there is a way to grain the number of the Track_Random (or at least it might not be documented)?
Thank you all in advance for your advice and suggestions!
Please bear in mind it is far past my bedtime and I am running on empty...
Add some ifs and save the picked tracks as variables so they aren't repeated?
Error for that line, not defined. This is with a version 3 EZb, not a v4.
It does not appear that the ControlCommand will respect variables as part of the command. As I get "Unknown window control command" for line 2 in even this code to just see if a variable can be used in the controlCommandParameter.
I should have added I tried that with a variable already. I too thought GetRandom might be a good solution.
It might be that what I'm asking for is not possible at this time, which is ok.
Justin, you are over my head. But , why wouldn't the sayWait command do the job?
@Rich, your script gave me an idea for the random tracks, since the controlCommandParameter would not take a variable I took what you had and did this:
I have 8 tracks (haha 8-track) (ok, technically 9 tracks) and this works MUCH better than Track_Random
@MovieMaker - good thought on sayWait. That would work well for text to speech output where the PC is generating the voice. What I'm doing is playing a sound file from a "Sound Board" and I'm looking for a way to achieve the a similar functionality for playing sounds or music files. It doesn't look like sayWait works for sound boards.
Ok, I understand now.
@Justin that would have been my second option. I don't know if ControlCommand does accept variables or not to be honest (I have never tried) but an IF nest with different ControlCommands as you have written should work without problem.
With the V3, use the V3 sound servo control and the V3 sound servo variable. You may need to adjust it from 0 if there is background noise etc. but the principle should work.