Trouble with SpeechRecognitionServer...

Background:
I have none. I have done a lilttle html (not programming) and have attemted and failed to learn any signifcant amount of C++, Java, and couple other languages. Failed miserably!
New to Apple (3-4 months,now), and loving it. Now I can work in both envirnments with acceptable speed. Got an iBook G4 1.42 GHz PowerPC G4. running Mac OS X v.10.4.7

The issue:
So I here applescript is pretty easy. So I attemt a few scripts. It works. So I try some more. They work too. Then it hits me… I’ll make a script from scratch that will run speech recognition to sort of run my iTunes. The script I have works well enough as a controler if you want to tell iTunes to move every minute or so.

The Problem:
I run the script… Call out a few commands… smile with delight at my wonderful creation, and sit back to listen to my music. Then about a minute and a half later, I get an error dialog telling me “AppleScript Error
SpeechRecognitionServer got an error: AppleEvent timed out.”

The Question:
How do I make it so that the Speech Recognition Server doesn’t time out?

Thanks for the help.

Jingy

Model: iBook G4
AppleScript: 1.10.7
Browser: Firefox 1.5.0.4
Operating System: Mac OS X (10.4)

By the way… I’m waiting… and wathcing the #of views go up… but not the responses.

For starters, Jingy, post the part of your script that matters here. Otherwise we can’t guess.

Sorry,

Noob error.

What part matters? The whole thing? What if it’s not done?

How much of the script do you need?

The error seems to be coming from the SpeechRecognitionServer. The script portion that deals with this is:

tell application "SpeechRecognitionServer"
	set heardPhrase to listen for {"Play"}
end tell

Not sure that this will help?

Speech recognition is set up in the System Preferences/Speech panel/Speech Recognition Pane. Do you have “Listen only while key is pressed” or Listen Continuously with keyword selected? If you’re listening continuously then it times out because you aren’t saying anything.

If you’re as noob as you say you might have got your start at this from a script you found somewhere. Let us see that.

Yes, it was a couple of different found items that I thought might work together. Here is the part of the script I am running. I think I have tied using a “set iteraction” thing is there somewhere and then told it to go until there are 5. To no avail.


--Part 1:
tell application "SpeechRecognitionServer"
	set heardPhrase to listen for {"Play", "Next", "Stop"}
end tell

--Part 2:
if heardPhrase is "Play" then
	tell application "iTunes"
		play
	end tell
else if heardPhrase is "Next" then
	tell application "iTunes"
		next track
	end tell
else if heardPhrase is "Stop" then
	tell application "iTunes"
		pause
	end tell
end if