SlideShare une entreprise Scribd logo
1  sur  18
Télécharger pour lire hors ligne
Speech Mashups
   Dan Burnett,Voxeo
    SpeechTek 2010
What are mashups?

<XML>   HTTP
 JSON
Why VoiceXML?
Why not VoiceXML?
Tropo scripting


              answer/reject/redirect/hangup
call/transfer/conference              ask/say/record/log
          startCallRecording/stopCallRecording
Weather app

• Collect postal code from caller
• Fetch weather from Yahoo using YQL
• Speak weather to the caller
Weather app


require 'open-uri'
require 'json'

answer




hangup
Weather app


require 'open-uri'
require 'json'

answer
say 'Welcome to the Ruby Yahoo weather reader'


say 'Thats all. Goodbye.'
hangup
Weather app
require 'open-uri'
require 'json'

answer
say 'Welcome to the Ruby Yahoo weather reader'




ask 'Enter the ZIP code for a weather check'
say 'Thats all. Goodbye.'
hangup
Weather app
require 'open-uri'
require 'json'

answer
say 'Welcome to the Ruby Yahoo weather reader'

options = { :choices        => "[5 DIGITS]",
            :onChoice       => lambda { |choice|

                 #Set the URI and our YQL select statement, then encode as a URI




                 #Fetch the JSON from the YQL API and convert the resulting
                 #JSON data to a Ruby hash


                 #Get the relevant weather channel details and throw them into a hash


                 #Speak back the results

             }
         }

ask 'Enter the ZIP code for a weather check', options
say 'Thats all. Goodbye.'
hangup
Weather app
require 'open-uri'
require 'json'

answer
say 'Welcome to the Ruby Yahoo weather reader'

options = { :choices       => "[5 DIGITS]",
            :onChoice      => lambda { |choice|

                 #Set the URI and our YQL select statement, then encode as a URI
                 yahoo_url = 'http://query.yahooapis.com/v1/public/yql?format=json&q='
                 query = "SELECT * FROM weather.forecast WHERE location = " + choice.value
                 url = URI.encode(yahoo_url + query)

                 #Fetch the JSON from the YQL API and convert the resulting
                 #JSON data to a Ruby hash
                 weather_data = JSON.parse(open(url).read)

                 #Get the relevant weather channel details and throw them into a hash
                 weather_results = weather_data["query"]["results"]["channel"]

                 #Speak back the results

             }
         }

ask 'Enter the ZIP code for a weather check', options
say 'Thats all. Goodbye.'
hangup
Weather app
require 'open-uri'
require 'json'

answer
say 'Welcome to the Ruby Yahoo weather reader'

options = { :choices        => "[5 DIGITS]",
            :onChoice       => lambda { |choice|

                 #Set the URI and our YQL select statement, then encode as a URI

                 #Fetch the JSON from the YQL API and convert the resulting
                 #JSON data to a Ruby hash

                 #Get the relevant weather channel details and throw them into a hash

                 #Speak back the results
                 say weather_results["description"]
                 say "The wind chill is #{weather_results["wind"]["chill"]} degrees, " +
                     "the wind speed is #{weather_results["wind"]["speed"]}"
                 say "The forecast is #{weather_results["item"]["forecast"][0]["text"]}, " +
                     "with a high of #{weather_results["item"]["forecast"][0]["high"]} degrees, " +
                     "and a low of #{weather_results["item"]["forecast"][0]["low"]} degrees."
             }
         }

ask 'Enter the ZIP code for a weather check', options
say 'Thats all. Goodbye.'
hangup
Weather app
require 'open-uri'
require 'json'

answer
say 'Welcome to the Ruby Yahoo weather reader'

options = { :choices        =>   "[5 DIGITS]",
            :repeat         =>   3,
            :timeout        =>   7,
            :onBadChoice    =>   lambda { say 'Invalid entry, please try again.' },
            :onTimeout      =>   lambda { say 'Timeout, please try again.' },
            :onChoice       =>   lambda { |choice|

                 #Set the URI and our YQL select statement, then encode as a URI

                 #Fetch the JSON from the YQL API and convert the resulting
                 #JSON data to a Ruby hash

                 #Get the relevant weather channel details and throw them into a hash

                 #Speak back the results


             }
         }

ask 'Enter the ZIP code for a weather check', options
say 'Thats all. Goodbye.'
hangup
Demo

• Upload script
• Link to a telephony application name
• Add phone numbers/IM/Jabber/SMS
Tropo Web API


                            tropo
                 answer/reject/redirect/hangup
call/session/transfer/conference ask/say/record/on/result/log
             startCallRecording/stopCallRecording

           JSON (JavaScript Object Notation)
Weather app
{"tropo": [
  {"say": [{"value": "Welcome to the Yahoo weather reader"}]},
  {"ask":
     {"say": [{"value": "Enter the ZIP code for a weather check"},
              {"value": "Invalid entry, please try again.", "event": "nomatch"},
              {"value": "Timeout, please try again.", "event": "timeout"}]},
     "repeat": 3,
     "timeout": 7,
     "choices": {"value": "[5 DIGITS]"},
  }]
}


-----------------   Receive recognition result ------------------------

{"tropo": [
        {"say": [{"value": "The wind chill is ..."},
                 {"value": "The forecast is ..."},
                 {"value": "Thats all. Goodbye."}]}}
]}
Other mashups
•   Yahoo Local over phone, SMS, and IM
    https://www.tropo.com/docs/scripting/t_php-localsearch.htm

•   SFO BART train arrival estimate
    https://www.tropo.com/docs/scripting/t_ruby-barteta.htm

•   Find location of someone based on telephone number
    https://www.tropo.com/docs/scripting/t_groovy-location-mashup.htm

•   Look up political campaign contributions
    text: [2-letter state id] [name] to +1.240.242.7944 .. ie "ut craig m smith"
    (also on jabber at tdata@tropo.im)

•   Look up bills in the NY Senate via IM or Twitter
    http://www.voiceingov.org/blog/?p=1005

•   Volunteer firefighter arrival time at fire station
Summary

Contenu connexe

Plus de Voxeo Corp

Voxeo Summit Day 2 - Securing customer interactions
Voxeo Summit Day 2 - Securing customer interactionsVoxeo Summit Day 2 - Securing customer interactions
Voxeo Summit Day 2 - Securing customer interactions
Voxeo Corp
 
Voxeo Summit Day 2 - Real-time communications with WebRTC
Voxeo Summit Day 2 - Real-time communications with WebRTCVoxeo Summit Day 2 - Real-time communications with WebRTC
Voxeo Summit Day 2 - Real-time communications with WebRTC
Voxeo Corp
 
Voxeo Summit Day 2 - Voxeo CXP for business users
Voxeo Summit Day 2 - Voxeo CXP for business usersVoxeo Summit Day 2 - Voxeo CXP for business users
Voxeo Summit Day 2 - Voxeo CXP for business users
Voxeo Corp
 
Voxeo Summit Day 2 - Creating raving fans
Voxeo Summit Day 2 - Creating raving fansVoxeo Summit Day 2 - Creating raving fans
Voxeo Summit Day 2 - Creating raving fans
Voxeo Corp
 
Voxeo Summit Day 2 - Advanced CCXML topics
Voxeo Summit Day 2 - Advanced CCXML topicsVoxeo Summit Day 2 - Advanced CCXML topics
Voxeo Summit Day 2 - Advanced CCXML topics
Voxeo Corp
 
Voxeo Summit Day 2 - The science of customer obsession
Voxeo Summit Day 2 - The science of customer obsessionVoxeo Summit Day 2 - The science of customer obsession
Voxeo Summit Day 2 - The science of customer obsession
Voxeo Corp
 
Serving the Social Customer: Scaling Your Support For Twitter, Facebook and More
Serving the Social Customer: Scaling Your Support For Twitter, Facebook and MoreServing the Social Customer: Scaling Your Support For Twitter, Facebook and More
Serving the Social Customer: Scaling Your Support For Twitter, Facebook and More
Voxeo Corp
 

Plus de Voxeo Corp (20)

Voxeo Summit Day 2 - Securing customer interactions
Voxeo Summit Day 2 - Securing customer interactionsVoxeo Summit Day 2 - Securing customer interactions
Voxeo Summit Day 2 - Securing customer interactions
 
Voxeo Summit Day 2 - Real-time communications with WebRTC
Voxeo Summit Day 2 - Real-time communications with WebRTCVoxeo Summit Day 2 - Real-time communications with WebRTC
Voxeo Summit Day 2 - Real-time communications with WebRTC
 
Voxeo Summit Day 2 - Voxeo CXP for business users
Voxeo Summit Day 2 - Voxeo CXP for business usersVoxeo Summit Day 2 - Voxeo CXP for business users
Voxeo Summit Day 2 - Voxeo CXP for business users
 
Voxeo Summit Day 2 - Creating raving fans
Voxeo Summit Day 2 - Creating raving fansVoxeo Summit Day 2 - Creating raving fans
Voxeo Summit Day 2 - Creating raving fans
 
Voxeo Summit Day 2 - Advanced CCXML topics
Voxeo Summit Day 2 - Advanced CCXML topicsVoxeo Summit Day 2 - Advanced CCXML topics
Voxeo Summit Day 2 - Advanced CCXML topics
 
Voxeo Summit Day 2 - The science of customer obsession
Voxeo Summit Day 2 - The science of customer obsessionVoxeo Summit Day 2 - The science of customer obsession
Voxeo Summit Day 2 - The science of customer obsession
 
Voxeo Summit Day 1 - Extending your IVR investment to mobile
Voxeo Summit Day 1 - Extending your IVR investment to mobileVoxeo Summit Day 1 - Extending your IVR investment to mobile
Voxeo Summit Day 1 - Extending your IVR investment to mobile
 
Voxeo Summit Day 1 - The Art of The Possible
Voxeo Summit Day 1 - The Art of The PossibleVoxeo Summit Day 1 - The Art of The Possible
Voxeo Summit Day 1 - The Art of The Possible
 
Voxeo Summit Day 1 - Prophecy log search
Voxeo Summit Day 1 - Prophecy log searchVoxeo Summit Day 1 - Prophecy log search
Voxeo Summit Day 1 - Prophecy log search
 
Voxeo Summit Day 1 - Customer experience analytics
Voxeo Summit Day 1 - Customer experience analyticsVoxeo Summit Day 1 - Customer experience analytics
Voxeo Summit Day 1 - Customer experience analytics
 
Voxeo Summit Day 1 - Communications-enabled Business Processes (CEBP)
Voxeo Summit Day 1 - Communications-enabled Business Processes (CEBP)Voxeo Summit Day 1 - Communications-enabled Business Processes (CEBP)
Voxeo Summit Day 1 - Communications-enabled Business Processes (CEBP)
 
Voxeo Summit Day 1 - A view into the Voxeo cloud
Voxeo Summit Day 1 - A view into the Voxeo cloudVoxeo Summit Day 1 - A view into the Voxeo cloud
Voxeo Summit Day 1 - A view into the Voxeo cloud
 
Voxeo Summit Day 1 - Lessons learned from large scale deployments
Voxeo Summit Day 1 - Lessons learned from large scale deploymentsVoxeo Summit Day 1 - Lessons learned from large scale deployments
Voxeo Summit Day 1 - Lessons learned from large scale deployments
 
How Do You Hear Me Now?
How Do You Hear Me Now?How Do You Hear Me Now?
How Do You Hear Me Now?
 
CCXML For Advanced Communications Applications
CCXML For Advanced Communications ApplicationsCCXML For Advanced Communications Applications
CCXML For Advanced Communications Applications
 
IPv6 and How It Impacts Communication Applications
IPv6 and How It Impacts Communication ApplicationsIPv6 and How It Impacts Communication Applications
IPv6 and How It Impacts Communication Applications
 
7 Critical Success Factors for Outbound IVR
7 Critical Success Factors for Outbound IVR7 Critical Success Factors for Outbound IVR
7 Critical Success Factors for Outbound IVR
 
5 Questions When Analyzing Your Analytics Options
5 Questions When Analyzing Your Analytics Options5 Questions When Analyzing Your Analytics Options
5 Questions When Analyzing Your Analytics Options
 
Serving the Social Customer: Scaling Your Support For Twitter, Facebook and More
Serving the Social Customer: Scaling Your Support For Twitter, Facebook and MoreServing the Social Customer: Scaling Your Support For Twitter, Facebook and More
Serving the Social Customer: Scaling Your Support For Twitter, Facebook and More
 
Comparative ASR Evaluation - Voxeo - SpeechTEK NY 2010
Comparative ASR Evaluation - Voxeo - SpeechTEK NY 2010Comparative ASR Evaluation - Voxeo - SpeechTEK NY 2010
Comparative ASR Evaluation - Voxeo - SpeechTEK NY 2010
 

Dernier

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Dernier (20)

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 

Speech Mashups - Dan Burnett - Voxeo - SpeechTEK NY 2010

  • 1. Speech Mashups Dan Burnett,Voxeo SpeechTek 2010
  • 5. Tropo scripting answer/reject/redirect/hangup call/transfer/conference ask/say/record/log startCallRecording/stopCallRecording
  • 6. Weather app • Collect postal code from caller • Fetch weather from Yahoo using YQL • Speak weather to the caller
  • 8. Weather app require 'open-uri' require 'json' answer say 'Welcome to the Ruby Yahoo weather reader' say 'Thats all. Goodbye.' hangup
  • 9. Weather app require 'open-uri' require 'json' answer say 'Welcome to the Ruby Yahoo weather reader' ask 'Enter the ZIP code for a weather check' say 'Thats all. Goodbye.' hangup
  • 10. Weather app require 'open-uri' require 'json' answer say 'Welcome to the Ruby Yahoo weather reader' options = { :choices => "[5 DIGITS]", :onChoice => lambda { |choice| #Set the URI and our YQL select statement, then encode as a URI #Fetch the JSON from the YQL API and convert the resulting #JSON data to a Ruby hash #Get the relevant weather channel details and throw them into a hash #Speak back the results } } ask 'Enter the ZIP code for a weather check', options say 'Thats all. Goodbye.' hangup
  • 11. Weather app require 'open-uri' require 'json' answer say 'Welcome to the Ruby Yahoo weather reader' options = { :choices => "[5 DIGITS]", :onChoice => lambda { |choice| #Set the URI and our YQL select statement, then encode as a URI yahoo_url = 'http://query.yahooapis.com/v1/public/yql?format=json&q=' query = "SELECT * FROM weather.forecast WHERE location = " + choice.value url = URI.encode(yahoo_url + query) #Fetch the JSON from the YQL API and convert the resulting #JSON data to a Ruby hash weather_data = JSON.parse(open(url).read) #Get the relevant weather channel details and throw them into a hash weather_results = weather_data["query"]["results"]["channel"] #Speak back the results } } ask 'Enter the ZIP code for a weather check', options say 'Thats all. Goodbye.' hangup
  • 12. Weather app require 'open-uri' require 'json' answer say 'Welcome to the Ruby Yahoo weather reader' options = { :choices => "[5 DIGITS]", :onChoice => lambda { |choice| #Set the URI and our YQL select statement, then encode as a URI #Fetch the JSON from the YQL API and convert the resulting #JSON data to a Ruby hash #Get the relevant weather channel details and throw them into a hash #Speak back the results say weather_results["description"] say "The wind chill is #{weather_results["wind"]["chill"]} degrees, " + "the wind speed is #{weather_results["wind"]["speed"]}" say "The forecast is #{weather_results["item"]["forecast"][0]["text"]}, " + "with a high of #{weather_results["item"]["forecast"][0]["high"]} degrees, " + "and a low of #{weather_results["item"]["forecast"][0]["low"]} degrees." } } ask 'Enter the ZIP code for a weather check', options say 'Thats all. Goodbye.' hangup
  • 13. Weather app require 'open-uri' require 'json' answer say 'Welcome to the Ruby Yahoo weather reader' options = { :choices => "[5 DIGITS]", :repeat => 3, :timeout => 7, :onBadChoice => lambda { say 'Invalid entry, please try again.' }, :onTimeout => lambda { say 'Timeout, please try again.' }, :onChoice => lambda { |choice| #Set the URI and our YQL select statement, then encode as a URI #Fetch the JSON from the YQL API and convert the resulting #JSON data to a Ruby hash #Get the relevant weather channel details and throw them into a hash #Speak back the results } } ask 'Enter the ZIP code for a weather check', options say 'Thats all. Goodbye.' hangup
  • 14. Demo • Upload script • Link to a telephony application name • Add phone numbers/IM/Jabber/SMS
  • 15. Tropo Web API tropo answer/reject/redirect/hangup call/session/transfer/conference ask/say/record/on/result/log startCallRecording/stopCallRecording JSON (JavaScript Object Notation)
  • 16. Weather app {"tropo": [ {"say": [{"value": "Welcome to the Yahoo weather reader"}]}, {"ask": {"say": [{"value": "Enter the ZIP code for a weather check"}, {"value": "Invalid entry, please try again.", "event": "nomatch"}, {"value": "Timeout, please try again.", "event": "timeout"}]}, "repeat": 3, "timeout": 7, "choices": {"value": "[5 DIGITS]"}, }] } ----------------- Receive recognition result ------------------------ {"tropo": [ {"say": [{"value": "The wind chill is ..."}, {"value": "The forecast is ..."}, {"value": "Thats all. Goodbye."}]}} ]}
  • 17. Other mashups • Yahoo Local over phone, SMS, and IM https://www.tropo.com/docs/scripting/t_php-localsearch.htm • SFO BART train arrival estimate https://www.tropo.com/docs/scripting/t_ruby-barteta.htm • Find location of someone based on telephone number https://www.tropo.com/docs/scripting/t_groovy-location-mashup.htm • Look up political campaign contributions text: [2-letter state id] [name] to +1.240.242.7944 .. ie "ut craig m smith" (also on jabber at tdata@tropo.im) • Look up bills in the NY Senate via IM or Twitter http://www.voiceingov.org/blog/?p=1005 • Volunteer firefighter arrival time at fire station