I've been playing with the SiriProxy a little more tonight. I managed to get her to accept and interpret open-ended text variables such as "Let's watch XXXXX".
I'm interpreting all such commands to be movie requests but I can expand the logic tree to query for media type easily enough later.
The query looks like this:
Code:
listen_for /let's watch (.*)/i do |title|
response = ask "Did you want to play #{title} in the theater?"
if(response =~ /yes/i)
say "OK. Let's watch #{title}.", spoken: "OK , , Let's watch #{title}. I heard that one is pretty good."
puts %x{/home/siri/SiriProxy/TriggerEvent.sh goto xbmc play #{title}}
else
say "I don't understand #{title}."
end
request_completed
end
I ask the user if that's what they really want. If they say yes then I send the command "goto xbmc play _title_\x0A" to the Crestron system. The Crestron simply parses this string, turns on the system (if it's off), and then passes the title request onto the xbmc.
Obviously there's no way of knowing whether or not I HAVE _title_ on the system or, at this point, for me to inform the user as such, but it's a start.
Works pretty well too:

