This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
# Start as (-D for debug): | |
# ./blather_ozone.rb -D | |
require 'rubygems' | |
require 'blather/client' | |
require 'awesome_print' | |
# The user credentials want to login Ozone as |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Started POST "/voicemail_deposits/receive_transcription?deposit_id=117&session_id=96cdc62945592ea0d992ad4269a18765" for 127.0.0.1 at Thu Feb 10 14:36:26 -0800 2011 | |
Processing by VoicemailDepositsController#receive_transcription as HTML | |
Parameters: {"{\"result\":{\"transcription\":\"Please confirm this message actually and make sure you get it bye.\",\"guid\":\"14ecf5a0-1794-012e-78e4-12313d064a99\",\"identifier\":null}}"=>nil, "session_id"=>"96cdc62945592ea0d992ad4269a18765", "deposit_id"=>"117"} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"session": { | |
"timestamp": "2011-02-02T18:03:34.875Z", | |
"from": { | |
"name": nil, | |
"network": "SMS", | |
"id": "14153701330", | |
"channel": "TEXT" | |
}, | |
"callId": "bbea42c7bd5505e30cb902e8dddef8db", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on tropo (ruby): | |
answer() | |
say("please wait while open voice is transferring your call") | |
transfer($currentCall.getHeader("x-sbc-numberToDial")) | |
for phono (rails): | |
<script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
answer | |
say 'Bonjour', :voice => 'florence' | |
result = ask( "Si vous êtes hycinthe, disons hycinthe ou appuyez sur 1, Si vous êtes vanessa, disons vanessa ou appuyez sur 2", { :recognizer => 'fr-fr', | |
:voice => 'florence', | |
:repeat => 3, | |
:choices => "hycinthe (1, hycinthe), vanessa (2, vanessa)" }) | |
log '++++++++++++++++++++++++++++++++++++result.name: ' + result.name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# example input: en, es, how are you, 16502437867. | |
# notice the comma as deliminator | |
%w(open-uri json).each do |lib| require lib; end | |
url = "http://ajax.googleapis.com/ajax/services/language/translate?v=1.0" | |
initialText = $currentCall.initialText.split(",") | |
initialText.each do |elem| elem.strip! end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'eventmachine' | |
module DigitCollector | |
def post_init | |
puts "-- someone connected to the echo server!" | |
end | |
def receive_data data | |
p ">>>you sent: #{data}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"**********" | |
{"query"=>{"results"=>{"result"=>{"value"=>"got some data here"}}, "uri"=>"http://query.yahooapis.com/v1/yql?q=SELECT+*+FROM+yql.storage+WHERE+name+%3D+%27store%3A%2F%2FLymM4H0i9TI0FgdrLZlAE1%27", "diagnostics"=>{"build-version"=>"3130", "publiclyCallable"=>"true", "user-time"=>"34", "service-time"=>"31"}, "count"=>"1", "lang"=>"en-US", "updated"=>Thu Sep 10 11:24:04 UTC 2009, "created"=>Thu Sep 10 11:24:04 UTC 2009}} | |
"**********" | |
{"query"=>{"results"=>{"success"=>"Updated store://jQhfGRIErjcVVzd4wOY2nj"}, "uri"=>"http://query.yahooapis.com/v1/yql?q=UPDATE+yql.storage+SET+value%3D%27%7B%22apples%22%3A%22green%22%2C%22bananas%22%3A%22yellow%22%7D%27+WHERE+name+%3D+%27store%3A%2F%2Fk02azLQDF27kArKxszngfx%27", "diagnostics"=>{"build-version"=>"3130", "publiclyCallable"=>"true", "user-time"=>"65", "service-time"=>"64"}, "count"=>"1", "lang"=>"en-US", "updated"=>Thu Sep 10 11:24:04 UTC 2009, "created"=>Thu Sep 10 11:24:04 UTC 2009}} | |
"**********" | |
{"query"=>{"results"=>{"result"=>{"value"=>{"bananas"=>" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'eventmachine' | |
module DigitCollector | |
def post_init | |
puts "-- someone connected to the echo server!" | |
end | |
def receive_data data | |
p ">>>you sent: #{data}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'curb' | |
curl = Curl::Easy.new 'http://sandite.orl.voxeo.net/transcribe' | |
curl.userpwd = 'username:password' | |
#voxeon:orlandorox | |
curl.multipart_form_post = true | |
curl.http_post Curl::PostField.file('filename', ARGV[0]), | |
Curl::PostField.content('transcriptionOutFormat', 'json'), |