Skip to content
This repository has been archived by the owner on Jan 28, 2023. It is now read-only.

Siri doesn't speak, despite "Say: ..." appearing in log #553

Closed
phpmycoder opened this issue Aug 2, 2013 · 2 comments
Closed

Siri doesn't speak, despite "Say: ..." appearing in log #553

phpmycoder opened this issue Aug 2, 2013 · 2 comments

Comments

@phpmycoder
Copy link

One of my listen_fors runs a script, which accesses and processes data from an API. Because of the size of the data, it takes approximately 1-1.5 seconds to return. Despite the fact that I say something before running the script and then say the results after (both of which appear in the siriproxy logs as being sent to my phone), Siri doesn't say anything and continues spinning until request_completed when it says the default "would you like me to search the web for ...".

listen_for /execute long task/i do
    say "Executing the long running task"  # this is never said
    response = %x(./long-task.sh) # takes ~1 sec to return
    say "Response is" + response # this isn't said either

    request_completed
end

Is there any way to force Siri to say the first statement and make her wait patiently until my second say and subsequent request_completed?

@elvisimprsntr
Copy link
Collaborator

I've found spawning a new thread works.

Example:

listen_for(/redeye initialize/i) do say "One moment while I initialize RedEye plugin..." Thread.new { init_redeyes update_resel say "SiriProxy RedEye plugin initialized." request_completed } end

@phpmycoder
Copy link
Author

@elvisimprsntr Indeed. This fixes the issue! Thanks for your solution!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants