SlideShare uma empresa Scribd logo
1 de 18
Baixar para ler offline
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

Mais conteúdo relacionado

Mais 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 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
 

Mais 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
 

Último

Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
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 StreamsRoshan Dwivedi
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
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 StrategiesBoston Institute of Analytics
 
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
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024The Digital Insurer
 
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 DevelopmentsTrustArc
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024SynarionITSolutions
 
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
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
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)wesley chun
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 

Último (20)

Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
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
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
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
 
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
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
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
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
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
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
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)
 
+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...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 

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