SlideShare una empresa de Scribd logo
1 de 18
Descargar para leer sin conexión
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

Más contenido relacionado

Más 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
 

Más 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

Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 

Último (20)

Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 

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