I was playing around today, try to make a script that will play an artist if you say their name. First, I set the names of the artists in iTunes as a variable. Then, I want the speech server to listen for those names, and then have iTunes play it. This is what I have done. It gives no errors, but it doesnt do anything. Any ideas?
tell application "iTunes"
set musicN to artists
tell application "SpeechRecognitionServer"
activate
try
set heardPhrase to listen for {musicN} giving up after 2 * days
on error -- time out
return
end try
end tell
tell application "iTunes" to play heardPhrase
end tell