Skip to content
Browse files

Added the ability to add a :spoken option to say and ask

-Example:

say "Do as I write", spoken: "Do not what I speak"

-Also re-fixed the ".git" errors :-)
  • Loading branch information...
1 parent 15ea7a2 commit 71794bc9e8f700cbc0dc4b12e13b68c5284b969d @plamoni committed Nov 29, 2011
Showing with 9 additions and 4 deletions.
  1. +1 −1 lib/siriproxy/plugin_manager.rb
  2. +5 −0 plugins/siriproxy-example/lib/siriproxy-example.rb
  3. +3 −3 siriproxy.gemspec
View
2 lib/siriproxy/plugin_manager.rb
@@ -41,7 +41,7 @@ def send_request_complete_to_iphone
end
def respond(text, options={})
- self.guzzoni_conn.inject_object_to_output_stream(generate_siri_utterance(self.guzzoni_conn.last_ref_id, text, text, options[:prompt_for_response] == true))
+ self.guzzoni_conn.inject_object_to_output_stream(generate_siri_utterance(self.guzzoni_conn.last_ref_id, text, (options[:spoken] or text), options[:prompt_for_response] == true))
end
def no_matches
View
5 plugins/siriproxy-example/lib/siriproxy-example.rb
@@ -19,6 +19,11 @@ def initialize(config)
request_completed #always complete your request! Otherwise the phone will "spin" at the user!
end
+
+ #Demonstrate that you can have Siri say one thing and write another"!
+ listen_for /you don't say/i do
+ say "Sometimes I don't write what I say", spoken: "Sometimes I don't say what I write"
+ end
#demonstrate state change
listen_for /siri proxy test state/i do
View
6 siriproxy.gemspec
@@ -13,9 +13,9 @@ Gem::Specification.new do |s|
s.rubyforge_project = "siriproxy"
- s.files = `git ls-files`.split("\n")
- s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
- s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
+ s.files = `git ls-files 2> /dev/null`.split("\n")
+ s.test_files = `git ls-files -- {test,spec,features}/* 2> /dev/null`.split("\n")
+ s.executables = `git ls-files -- bin/* 2> /dev/null`.split("\n").map{ |f| File.basename(f) }
s.require_paths = ["lib"]
s.required_ruby_version = Gem::Requirement.new(">= 1.9.2")

0 comments on commit 71794bc

Please sign in to comment.
Something went wrong with that request. Please try again.