SlideShare ist ein Scribd-Unternehmen logo
1 von 18
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Mehr von 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 interactionsVoxeo 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 WebRTCVoxeo 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 usersVoxeo 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 fansVoxeo 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 topicsVoxeo 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 obsessionVoxeo Corp
 
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 mobileVoxeo Corp
 
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 PossibleVoxeo Corp
 
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 searchVoxeo Corp
 
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 analyticsVoxeo Corp
 
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 Corp
 
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 cloudVoxeo Corp
 
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 deploymentsVoxeo Corp
 
How Do You Hear Me Now?
How Do You Hear Me Now?How Do You Hear Me Now?
How Do You Hear Me Now?Voxeo Corp
 
CCXML For Advanced Communications Applications
CCXML For Advanced Communications ApplicationsCCXML For Advanced Communications Applications
CCXML For Advanced Communications ApplicationsVoxeo Corp
 
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 ApplicationsVoxeo Corp
 
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 IVRVoxeo Corp
 
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 OptionsVoxeo 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 MoreVoxeo Corp
 
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 2010Voxeo Corp
 

Mehr von 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
 

Kürzlich hochgeladen

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
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 2024Rafal Los
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
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?Igalia
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
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...apidays
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
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 Processorsdebabhi2
 
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 Scriptwesley chun
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 

Kürzlich hochgeladen (20)

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 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?
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
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...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
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
 
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
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 

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