Submit Search
Upload
IBM Watson & PHP, A Practical Demonstration
•
2 likes
•
1,550 views
C
Clark Everetts
Follow
IBM Watson & PHP, A Practical Demonstration
Read less
Read more
Technology
Report
Share
Report
Share
1 of 48
Download now
Download to read offline
Recommended
MySQL day Dublin - OCI & Application Development
MySQL day Dublin - OCI & Application Development
Henry J. Kröger
Hortonworks DataFlow (HDF) 3.3 - Taking Stream Processing to the Next Level
Hortonworks DataFlow (HDF) 3.3 - Taking Stream Processing to the Next Level
Hortonworks
Cloud-Native Machine Learning: Emerging Trends and the Road Ahead
Cloud-Native Machine Learning: Emerging Trends and the Road Ahead
DataWorks Summit
ElastiCache and Redis - Samir Karande
ElastiCache and Redis - Samir Karande
Amazon Web Services
Data Centric Transformation in Telecom
Data Centric Transformation in Telecom
DataWorks Summit
Accelerate Your C/C++ Applications with Amazon EC2 F1 Instances (CMP405) - AW...
Accelerate Your C/C++ Applications with Amazon EC2 F1 Instances (CMP405) - AW...
Amazon Web Services
IBM+Hortonworks = Transformation of the Big Data Landscape
IBM+Hortonworks = Transformation of the Big Data Landscape
Hortonworks
Getting the Most Out of Your Data in the Cloud with Cloudbreak
Getting the Most Out of Your Data in the Cloud with Cloudbreak
Hortonworks
Recommended
MySQL day Dublin - OCI & Application Development
MySQL day Dublin - OCI & Application Development
Henry J. Kröger
Hortonworks DataFlow (HDF) 3.3 - Taking Stream Processing to the Next Level
Hortonworks DataFlow (HDF) 3.3 - Taking Stream Processing to the Next Level
Hortonworks
Cloud-Native Machine Learning: Emerging Trends and the Road Ahead
Cloud-Native Machine Learning: Emerging Trends and the Road Ahead
DataWorks Summit
ElastiCache and Redis - Samir Karande
ElastiCache and Redis - Samir Karande
Amazon Web Services
Data Centric Transformation in Telecom
Data Centric Transformation in Telecom
DataWorks Summit
Accelerate Your C/C++ Applications with Amazon EC2 F1 Instances (CMP405) - AW...
Accelerate Your C/C++ Applications with Amazon EC2 F1 Instances (CMP405) - AW...
Amazon Web Services
IBM+Hortonworks = Transformation of the Big Data Landscape
IBM+Hortonworks = Transformation of the Big Data Landscape
Hortonworks
Getting the Most Out of Your Data in the Cloud with Cloudbreak
Getting the Most Out of Your Data in the Cloud with Cloudbreak
Hortonworks
The Role of Standards in IoT Security
The Role of Standards in IoT Security
Hannes Tschofenig
Building your own chat bot with Amazon Lex - Hebrew Webinar
Building your own chat bot with Amazon Lex - Hebrew Webinar
Boaz Ziniman
국내 미디어 고객사의 AWS 활용 사례 - POOQ 서비스, 콘텐츠연합플랫폼::조휘열::AWS Summit Seoul 2018
국내 미디어 고객사의 AWS 활용 사례 - POOQ 서비스, 콘텐츠연합플랫폼::조휘열::AWS Summit Seoul 2018
Amazon Web Services Korea
Using LLVM to accelerate processing of data in Apache Arrow
Using LLVM to accelerate processing of data in Apache Arrow
DataWorks Summit
Custom Component development Oracle's Intelligent Bot Platform
Custom Component development Oracle's Intelligent Bot Platform
Leon Smiers
Breaking Up the Monolith While Migrating to AWS (GPSTEC320) - AWS re:Invent 2018
Breaking Up the Monolith While Migrating to AWS (GPSTEC320) - AWS re:Invent 2018
Amazon Web Services
Lex and connect
Lex and connect
Richard Harvey
Intro to AWS Cloud Development Kit | AWS Floor28
Intro to AWS Cloud Development Kit | AWS Floor28
Amazon Web Services
Mobile Web Applications using HTML5 [IndicThreads Mobile Application Develop...
Mobile Web Applications using HTML5 [IndicThreads Mobile Application Develop...
IndicThreads
AI Powered Conversational Interfaces
AI Powered Conversational Interfaces
Amazon Web Services
Connected Product Development - Secure Cloud & Local Connectivity for Microco...
Connected Product Development - Secure Cloud & Local Connectivity for Microco...
Amazon Web Services
Driving Innovation with Serverless Applications (GPSBUS212) - AWS re:Invent 2018
Driving Innovation with Serverless Applications (GPSBUS212) - AWS re:Invent 2018
Amazon Web Services
Introduction to Backend Development (1).pptx
Introduction to Backend Development (1).pptx
OsuGodbless
運用 AWS Edge Services 作為遊戲行業的關鍵基礎設施元件 (Level 200)
運用 AWS Edge Services 作為遊戲行業的關鍵基礎設施元件 (Level 200)
Amazon Web Services
ai mlLeverage Data and AI/ML to Drive New Experiences and Make Better Decisions
ai mlLeverage Data and AI/ML to Drive New Experiences and Make Better Decisions
Amazon Web Services
Media Processing Workflows at High Velocity and Scale using AI and ML - AWS O...
Media Processing Workflows at High Velocity and Scale using AI and ML - AWS O...
Amazon Web Services
Zapbuild Portfolio
Zapbuild Portfolio
Zapbuild
Platform as Art: A Developer’s Perspective
Platform as Art: A Developer’s Perspective
Brian Deitte
Amazon FreeRTOS: IoT Operating System for Microcontrollers (IOT208-R1) - AWS ...
Amazon FreeRTOS: IoT Operating System for Microcontrollers (IOT208-R1) - AWS ...
Amazon Web Services
Open Source AI - News and examples
Open Source AI - News and examples
Luciano Resende
Analysis of-quality-of-pkgs-in-packagist-univ-20171024
Analysis of-quality-of-pkgs-in-packagist-univ-20171024
Clark Everetts
Php Dependency Management with Composer ZendCon 2017
Php Dependency Management with Composer ZendCon 2017
Clark Everetts
More Related Content
Similar to IBM Watson & PHP, A Practical Demonstration
The Role of Standards in IoT Security
The Role of Standards in IoT Security
Hannes Tschofenig
Building your own chat bot with Amazon Lex - Hebrew Webinar
Building your own chat bot with Amazon Lex - Hebrew Webinar
Boaz Ziniman
국내 미디어 고객사의 AWS 활용 사례 - POOQ 서비스, 콘텐츠연합플랫폼::조휘열::AWS Summit Seoul 2018
국내 미디어 고객사의 AWS 활용 사례 - POOQ 서비스, 콘텐츠연합플랫폼::조휘열::AWS Summit Seoul 2018
Amazon Web Services Korea
Using LLVM to accelerate processing of data in Apache Arrow
Using LLVM to accelerate processing of data in Apache Arrow
DataWorks Summit
Custom Component development Oracle's Intelligent Bot Platform
Custom Component development Oracle's Intelligent Bot Platform
Leon Smiers
Breaking Up the Monolith While Migrating to AWS (GPSTEC320) - AWS re:Invent 2018
Breaking Up the Monolith While Migrating to AWS (GPSTEC320) - AWS re:Invent 2018
Amazon Web Services
Lex and connect
Lex and connect
Richard Harvey
Intro to AWS Cloud Development Kit | AWS Floor28
Intro to AWS Cloud Development Kit | AWS Floor28
Amazon Web Services
Mobile Web Applications using HTML5 [IndicThreads Mobile Application Develop...
Mobile Web Applications using HTML5 [IndicThreads Mobile Application Develop...
IndicThreads
AI Powered Conversational Interfaces
AI Powered Conversational Interfaces
Amazon Web Services
Connected Product Development - Secure Cloud & Local Connectivity for Microco...
Connected Product Development - Secure Cloud & Local Connectivity for Microco...
Amazon Web Services
Driving Innovation with Serverless Applications (GPSBUS212) - AWS re:Invent 2018
Driving Innovation with Serverless Applications (GPSBUS212) - AWS re:Invent 2018
Amazon Web Services
Introduction to Backend Development (1).pptx
Introduction to Backend Development (1).pptx
OsuGodbless
運用 AWS Edge Services 作為遊戲行業的關鍵基礎設施元件 (Level 200)
運用 AWS Edge Services 作為遊戲行業的關鍵基礎設施元件 (Level 200)
Amazon Web Services
ai mlLeverage Data and AI/ML to Drive New Experiences and Make Better Decisions
ai mlLeverage Data and AI/ML to Drive New Experiences and Make Better Decisions
Amazon Web Services
Media Processing Workflows at High Velocity and Scale using AI and ML - AWS O...
Media Processing Workflows at High Velocity and Scale using AI and ML - AWS O...
Amazon Web Services
Zapbuild Portfolio
Zapbuild Portfolio
Zapbuild
Platform as Art: A Developer’s Perspective
Platform as Art: A Developer’s Perspective
Brian Deitte
Amazon FreeRTOS: IoT Operating System for Microcontrollers (IOT208-R1) - AWS ...
Amazon FreeRTOS: IoT Operating System for Microcontrollers (IOT208-R1) - AWS ...
Amazon Web Services
Open Source AI - News and examples
Open Source AI - News and examples
Luciano Resende
Similar to IBM Watson & PHP, A Practical Demonstration
(20)
The Role of Standards in IoT Security
The Role of Standards in IoT Security
Building your own chat bot with Amazon Lex - Hebrew Webinar
Building your own chat bot with Amazon Lex - Hebrew Webinar
국내 미디어 고객사의 AWS 활용 사례 - POOQ 서비스, 콘텐츠연합플랫폼::조휘열::AWS Summit Seoul 2018
국내 미디어 고객사의 AWS 활용 사례 - POOQ 서비스, 콘텐츠연합플랫폼::조휘열::AWS Summit Seoul 2018
Using LLVM to accelerate processing of data in Apache Arrow
Using LLVM to accelerate processing of data in Apache Arrow
Custom Component development Oracle's Intelligent Bot Platform
Custom Component development Oracle's Intelligent Bot Platform
Breaking Up the Monolith While Migrating to AWS (GPSTEC320) - AWS re:Invent 2018
Breaking Up the Monolith While Migrating to AWS (GPSTEC320) - AWS re:Invent 2018
Lex and connect
Lex and connect
Intro to AWS Cloud Development Kit | AWS Floor28
Intro to AWS Cloud Development Kit | AWS Floor28
Mobile Web Applications using HTML5 [IndicThreads Mobile Application Develop...
Mobile Web Applications using HTML5 [IndicThreads Mobile Application Develop...
AI Powered Conversational Interfaces
AI Powered Conversational Interfaces
Connected Product Development - Secure Cloud & Local Connectivity for Microco...
Connected Product Development - Secure Cloud & Local Connectivity for Microco...
Driving Innovation with Serverless Applications (GPSBUS212) - AWS re:Invent 2018
Driving Innovation with Serverless Applications (GPSBUS212) - AWS re:Invent 2018
Introduction to Backend Development (1).pptx
Introduction to Backend Development (1).pptx
運用 AWS Edge Services 作為遊戲行業的關鍵基礎設施元件 (Level 200)
運用 AWS Edge Services 作為遊戲行業的關鍵基礎設施元件 (Level 200)
ai mlLeverage Data and AI/ML to Drive New Experiences and Make Better Decisions
ai mlLeverage Data and AI/ML to Drive New Experiences and Make Better Decisions
Media Processing Workflows at High Velocity and Scale using AI and ML - AWS O...
Media Processing Workflows at High Velocity and Scale using AI and ML - AWS O...
Zapbuild Portfolio
Zapbuild Portfolio
Platform as Art: A Developer’s Perspective
Platform as Art: A Developer’s Perspective
Amazon FreeRTOS: IoT Operating System for Microcontrollers (IOT208-R1) - AWS ...
Amazon FreeRTOS: IoT Operating System for Microcontrollers (IOT208-R1) - AWS ...
Open Source AI - News and examples
Open Source AI - News and examples
More from Clark Everetts
Analysis of-quality-of-pkgs-in-packagist-univ-20171024
Analysis of-quality-of-pkgs-in-packagist-univ-20171024
Clark Everetts
Php Dependency Management with Composer ZendCon 2017
Php Dependency Management with Composer ZendCon 2017
Clark Everetts
Php Dependency Management with Composer ZendCon 2016
Php Dependency Management with Composer ZendCon 2016
Clark Everetts
Automated Infrastructure and Application Management
Automated Infrastructure and Application Management
Clark Everetts
Sunshine php practical-zf1-zf2-migration
Sunshine php practical-zf1-zf2-migration
Clark Everetts
Zend con practical-zf1-zf2-migration
Zend con practical-zf1-zf2-migration
Clark Everetts
Zend con what-i-learned-about-mobile-first
Zend con what-i-learned-about-mobile-first
Clark Everetts
More from Clark Everetts
(7)
Analysis of-quality-of-pkgs-in-packagist-univ-20171024
Analysis of-quality-of-pkgs-in-packagist-univ-20171024
Php Dependency Management with Composer ZendCon 2017
Php Dependency Management with Composer ZendCon 2017
Php Dependency Management with Composer ZendCon 2016
Php Dependency Management with Composer ZendCon 2016
Automated Infrastructure and Application Management
Automated Infrastructure and Application Management
Sunshine php practical-zf1-zf2-migration
Sunshine php practical-zf1-zf2-migration
Zend con practical-zf1-zf2-migration
Zend con practical-zf1-zf2-migration
Zend con what-i-learned-about-mobile-first
Zend con what-i-learned-about-mobile-first
Recently uploaded
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
sudhanshuwaghmare1
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Edi Saputra
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
The Digital Insurer
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
Zilliz
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Juan lago vázquez
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
Rustici Software
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Orbitshub
Architecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
Product Anonymous
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Angeliki Cooney
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
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
apidays
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
MIND CTI
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
Christopher Logan Kennedy
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
Zilliz
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Jeffrey Haguewood
Recently uploaded
(20)
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Architecting Cloud Native Applications
Architecting Cloud Native Applications
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
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 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
IBM Watson & PHP, A Practical Demonstration
1.
© 2018 Rogue
Wave Software, Inc. All Rights Reserved. 1 IBM Watson & PHP: A Practical Demonstration Clark Everetts, Rogue Wave Software php[tek] 2018 31 May 2018 Atlanta Georgia
2.
© 2018 Rogue
Wave Software, Inc. All Rights Reserved. 2 Agenda • The Goal • Possible ML use cases • Sample database • IBM Cloud brief overview • Text to Speech :-) • Speech to Text :-/ • Initial Chatbot with Watson Assistant • Next Steps / Further Research
3.
© 2018 Rogue
Wave Software, Inc. All Rights Reserved. 3 My end goal • Can you find how much of your inventory is on hand or allocated? • Which product lines your customers are buying, and in what volume? • Hands-free? • How can Watson services help you: • understand how much stock is available • who is buying and selling it • spot trends • Key concepts and points: • speech-to-text • text-to-speech • interactive application on IBM i • powered by Watson in the cloud • data residing on the IBM I – not stored in cloud
4.
© 2018 Rogue
Wave Software, Inc. All Rights Reserved. 4 Machine Learning Use-Case: Code Quality Higher quality libraries are • Easier to understand • Easier to maintain • Easier to test • Get updated sooner • Bugfixes • New features • Don’t break as easily or as often • Greater interest/participation from dev team and users *Campbell County Kentucky Public Library
5.
© 2018 Rogue
Wave Software, Inc. All Rights Reserved. 5 Code Quality: Cognitive vs. Static Analysis • PHPLOC – size metrics, complexity, dependencies, structure – https://github.com/sebastianbergmann/phploc • Copy/Paste Detector – finds duplicated code (exact dups) – https://github.com/sebastianbergmann/phpcpd • PHP Depend - – https://pdepend.org/ • PHP Mess Detector – https://phpmd.org/ • Phpstan – https://github.com/phpstan/phpstan • Phan – https://github.com/phan/phan • Exakat – https://www.exakat.io/ • PHPMetrics – http://www.phpmetrics.org/ Watson: ?
6.
© 2018 Rogue
Wave Software, Inc. All Rights Reserved. 6 Know anybody with a warehouse? Product picking system Text-to-speech and db-connectivity are key.
7.
© 2018 Rogue
Wave Software, Inc. All Rights Reserved. 7 BIRT Sample Database BIRT – Business Intelligence Reporting Tools Eclipse Project, has an interesting sample database Classic marine, car, truck, and train models. DB Tables: Offices Employees Customers Orders Payments Order Details Products Product Lines
8.
© 2018 Rogue
Wave Software, Inc. All Rights Reserved. 8 BIRT Database Schema
9.
© 2018 Rogue
Wave Software, Inc. All Rights Reserved. 9 IBM Bluemix Cloud https://console.bluemix.net/ (login with IBM id) Stay informed!! https://www.ibm.com/blogs/bluemix/
10.
© 2018 Rogue
Wave Software, Inc. All Rights Reserved. 10 IBM Cloud Catalog Categories Infrastructure Compute Storage Network Security Containers VMware Platform Boilerplates APIs Application Services Blockchain Cloud Foundry Apps Data & Analytics DevOps Finance Functions Integrate Internet of Things Mobile Network Security Storage Watson
11.
© 2018 Rogue
Wave Software, Inc. All Rights Reserved. 11 IBM Cloud Catalog: Watson
12.
© 2018 Rogue
Wave Software, Inc. All Rights Reserved. 12 Choosing the right services • Several related / overlapping services • Need good understanding • Application • functionality, scope, breadth, depth • Nature of data • static / dynamic • structure & contents • size • Watson services • what each provides, & doesn’t • setup, (re)training, update • initial and ongoing cost
13.
© 2018 Rogue
Wave Software, Inc. All Rights Reserved. 13 IBM Cloud Catalog: Watson
14.
© 2018 Rogue
Wave Software, Inc. All Rights Reserved. 14 Challenges • Unstructured speech to structured db queries • Correctly parsing the resulting text • Building correct SQL query from text • Knowing when not to attempt a query Question: “Who are my customers?” Appropriate Query: Select customerName from Customers join Employees on salesrepEmployeeNumber = employeeNumber where salesrepEmployeeNumber = X; • Intention, Context, Memory • Q1. Who are my customers? (company name or point of contact) • Q2. Where are they located? (city, state, province, sales region, country?) • Q3. Who has not ordered in three months? “my” (authenticated user), “they” (results of Q1), “who” (results of Q1, not Q2)
15.
© 2018 Rogue
Wave Software, Inc. All Rights Reserved. 15 Text-to-Speech: Overview • Quickly converts written text to natural-sounding speech • Voice-driven and screenless interfaces • Anywhere where audio is the preferred method of output • home automation solutions • assistance tools for the vision-impaired • reading text and email messages aloud to drivers • video script narration and voice over • reading-based educational tools
16.
© 2018 Rogue
Wave Software, Inc. All Rights Reserved. 16 Text-to-Speech: Features • HTTP and WebSocket interfaces • SSML (Speech Synthesis Markup Language) • Audio formats • Ogg format with Opus or Vorbis codec • Waveform Audio File Format (WAV) • Free Lossless Audio Codec (FLAC) • MP3 (Motion Picture Experts Group, or MPEG) • Web Media (WebM) with the Opus or Vorbis codec • Linear 16-bit Pulse-Code Modulation (PCM) • mu-law (u-law) • basic audio • Languages • English, French, German, Italian, Japanese, Spanish, and Brazilian Portuguese
17.
© 2018 Rogue
Wave Software, Inc. All Rights Reserved. 17 Text-to-Speech: Features (cont’d) • Voices - • one male or female voice, sometimes both, for each language • US and UK English and Castilian, Latin American, North American Spanish • uses appropriate cadence and intonation • Expressiveness • Add’l SSML element to indicate a speaking style • GoodNews, Apology, Uncertainty • currently US English Allison voice only • Voice transformation • pitch, rate, timbre • built-in transformations for “young” and “soft” • Customization of pronunciation • International Phonetic Alphabet (IPA) • IBM Symbolic Phonetic Representation (SPR) • Text-to-speech demo https://text-to-speech- demo.ng.bluemix.net/
18.
© 2018 Rogue
Wave Software, Inc. All Rights Reserved. 18 Text-to-Speech: Initial Test <?php namespace ClarkPhpWatsonDemo; use GuzzleHttpClient; use ZendDiactorosRequest; use ZendDiactorosUri; use ZendDiactorosResponse; require __DIR__ . '/../vendor/autoload.php'; require __DIR__ . '/../src/classic-models.php'; call_user_func(function () { $config = getConfig()['text-to-speech']; $client = new Client(); $request = (new Request()) ->withUri((new Uri("{$config['uri']}/synthesize")) ->withQuery('voice=en-US_AllisonVoice')) ->withMethod('POST') ->withAddedHeader('Authorization', 'Basic ' . base64_encode("{$config['username']}:{$config['password']}")) ->withAddedHeader('Content-Type', 'application/json') ->withAddedHeader('Accept', $config['mime_type']);
19.
© 2018 Rogue
Wave Software, Inc. All Rights Reserved. 19 Text-to-Speech: Initial Test (cont’d) $request->getBody()->write( json_encode(['text' => 'Customer requested special shipment. The instructions were passed along to the warehouse.']) ); $response = $client->send($request); // send to Watson // send audio output back to web browser header("Content-Type: {$config['mime_type']}"); header('Content-Disposition: inline; filename=result.ogg'); header('Content_Length: ' . strlen($response->getBody())); print $response->getBody(); });
20.
© 2018 Rogue
Wave Software, Inc. All Rights Reserved. 20 Application Configuration <?php return [ 'text-to-speech' => [ 'mime_type' => 'audio/ogg;codecs=opus', 'uri' => 'https://stream.watsonplatform.net/text-to-speech/api/v1', ], 'speech-to-text' => [ 'mime_type' => 'audio/ogg;codecs=opus', 'uri' => 'https://stream.watsonplatform.net/speech-to-text/api/v1', ], 'db' => [ 'I71EDU' => [ 'options' => [ 'autocommit' => DB2_AUTOCOMMIT_OFF, 'DB2_ATTR_CASE' => DB2_CASE_NATURAL, 'cursor' => DB2_FORWARD_ONLY, 'i5_lib' => 'CLARK', 'i5_naming' => DB2_I5_NAMING_OFF, 'i5_query_optimize' => DB2_ALL_IO, ], ], ], ];
21.
© 2018 Rogue
Wave Software, Inc. All Rights Reserved. 21 Credentials Configuration <?php return [ 'text-to-speech' => [ 'username' => ‘a-big-long-obfuscated-hash', 'password' => ‘a-secret-hash' ], 'speech-to-text' => [ 'username' => ' another-obfuscated-hash', 'password' => ' another-secret-hash' ], 'db' => [ 'I71EDU' => [ 'userprofile' => ‘my-user-name', 'password' => ‘my-password' ], ], ]; Keep auth credentials out of source code repository by putting them in a separate file, and mark that file to be ignore by version control.
22.
© 2018 Rogue
Wave Software, Inc. All Rights Reserved. 22 Merged Configuration function getConfig() { return array_merge_recursive( require_once __DIR__ . '/../config/config.php', require_once __DIR__ . '/../config/credentials.php' ); } Calling the above yields the following merged configuration: [ 'text-to-speech' => [ 'mime_type' => 'audio/ogg;codecs=opus', 'uri' => 'https://stream.watsonplatform.net/text-to-speech/api/v1/', 'username' => ‘a-big-long-obfuscated-hash', 'password' => ‘a-secret-hash‘ ], 'speech-to-text' => […], 'db' => […] ]
23.
© 2018 Rogue
Wave Software, Inc. All Rights Reserved. 23 Text-to-Speech: Product Description call_user_func(function () { $config = getConfig(); $db = getDbConnection($config); $productDesc = getRandomProductDescription($db); $client = new Client(); $request = (new Request()) ->withUri((new Uri("{$config['text-to-speech']['uri']}/synthesize")) ->withQuery('voice=en-US_AllisonVoice’)) // config candidate ->withMethod('POST') ->withAddedHeader( 'Authorization', 'Basic ' . base64_encode("{$config['text-to- speech']['username']}:{$config['text-to-speech']['password']}") )->withAddedHeader('Content-Type', 'application/json') ->withAddedHeader('Accept', $config['text-to-speech']['mime_type']);
24.
© 2018 Rogue
Wave Software, Inc. All Rights Reserved. 24 Text-to-Speech: Product Description (cont’d) $request->getBody()->write( json_encode(['text' => $productDesc ?: 'I was unable to access any product description.']) ); $response = $client->send($request); header("Content-Type: {$config['text-to-speech']['mime_type']}"); header('Content-Disposition: inline; filename=result.ogg'); header('Content_Length: ' . strlen($response->getBody())); print $response->getBody(); });
25.
© 2018 Rogue
Wave Software, Inc. All Rights Reserved. 25 Quick Demo
26.
© 2018 Rogue
Wave Software, Inc. All Rights Reserved. 26 Speech-to-Text: Overview • Converts human voice into the written word • Potential uses • voice control of embedded systems • transcription of meetings and conference calls • dictation • Combines information about grammar and language structure with knowledge of the composition of the audio signal to generate a transcription • Languages: US and UK English, Japanese, Arabic, Mandarin, Brazilian Portuguese, Spanish (Latin American & Spain), French, Localized version available in Japan via SoftBank • Metadata object in JSON response • confidence score (per word), start/end time (per word), and alternate hypotheses / N-Best (per phrase), word alternatives per (sequential) time intervals • Keyword Spotting (beta) • search for keywords in audio stream. Begin/end times, confidence score for each instance of the keyword found
27.
© 2018 Rogue
Wave Software, Inc. All Rights Reserved. 27 Speech-to-Text: Overview (cont’d) • Mobile SDKs (beta) for iOS and Android • Optional metadata in JSON response includes • confidence score (per word), start/end time (per word), alternate hypotheses / N-Best (per phrase). alternatives per (sequential) time interval • Keyword search in audio stream • beginning and end times • confidence score for each instance found • currently available at no additional charge
28.
© 2018 Rogue
Wave Software, Inc. All Rights Reserved. 28 Speech-to-Text: Available Interfaces • WebSocket • single version of recognize method for transcribing audio • low latency, high throughput over a full-duplex connection • HTTP REST • HTTP POST versions of recognize method for transcribing audio with or without establishing a session with the service • Accept input audio via • request body • multipart form data consisting of one or more audio files • Can establish and maintain sessions with the service • Obtain information about supported languages and models
29.
© 2018 Rogue
Wave Software, Inc. All Rights Reserved. 29 Speech-to-Text: Available Interfaces • Asynchronous HTTP • Provides a non-blocking POST recognitions method • Additional methods let you register a callback URL, to which the service sends job status and optional results or to check the status of jobs and retrieve results manually • Uses HMAC-SHA1 signatures based on a user-specified secret to provide authentication and data integrity for callback notifications
30.
© 2018 Rogue
Wave Software, Inc. All Rights Reserved. 30 Speech-to-Text: First Attempt What I said: Hello! This is Clark Everetts with Rogue Wave Software. I’m unable to take your call at the moment, but if you leave your name, telephone number, and a brief message, I’ll return your call as soon as possible. Thank-you! What I got: hello this is or ever will when software mama unable to halt the moment but if you leave your home telephone number and message of return your call as soon as possible and
31.
© 2018 Rogue
Wave Software, Inc. All Rights Reserved. 31 Speech-to-Text: Alternatives “ … as soon as possible and “ (selected with highest confidence of 0.628) “ … as soon as possible “ “ … as soon as possible are “ "alternatives": [ { "timestamps": [ [ "hello", 0.13, 0.56 ], [ "this", 0.59, 0.76 ], [ "is", 0.76, 0.98 ], [ "or", 1.02, 1.3 ], [ "ever", 1.33, 1.64 ],
32.
© 2018 Rogue
Wave Software, Inc. All Rights Reserved. 32 Speech-to-Text: Recent Attempt What I said: Hello! This is Clark Everetts with Rogue Wave Software. I’m unable to take your call at the moment, but if you leave your name, telephone number, and a brief message, I’ll return your call as soon as possible. Thank-you! What I got: hello this is or ever will one software on unable to recall the moment but if you own telephone number which of the turn your call as soon as possible My theory: Terrible quality of audio taken from my laptop. Even after editing out the worst hiss, the speech, though clear enough to a person, isn’t clear enough for speech recognition.
33.
© 2018 Rogue
Wave Software, Inc. All Rights Reserved. 33 Speech-to-Text test: Code <?php namespace ClarkPhpWatsonDemo; use GuzzleHttpClient; use ZendDiactorosRequest; use ZendDiactorosUri; use ZendDiactorosResponse; require __DIR__ . '/../vendor/autoload.php'; require __DIR__ . '/../src/classic-models.php'; call_user_func(function () { $config = getConfig(); $config = $config['speech-to-text']; $client = new Client();
34.
© 2018 Rogue
Wave Software, Inc. All Rights Reserved. 34 Speech-to-Text test: Code (cont’d) $request = (new Request()) ->withUri((new Uri("{$config['uri']}/recognize")) ->withQuery('timestamps=true&max_alternatives=3&inactivity_timeout=3')) ->withMethod('POST') ->withAddedHeader('Authorization', 'Basic ' . base64_encode("{$config['username']}:{$config['password']}")) ->withAddedHeader('Content-Type', 'audio/flac') ->withAddedHeader('Accept', 'application/json'); $request->getBody() ->write(file_get_contents(__DIR__ . '/../docs/telephone-greeting.flac')); $response = $client->send($request); print('<pre>'); printf("Response status: %d (%s)n", $response->getStatusCode(), $response->getReasonPhrase() ); printf("Headers:n"); foreach ($response->getHeaders() as $header => $values) { printf(" %s: %sn", $header, implode(', ', $values)); } printf("Message:n%sn", $response->getBody()); print '</pre>'; });
35.
© 2018 Rogue
Wave Software, Inc. All Rights Reserved. 35 Watson Assistant: Overview • Natural language interface backend for any application • Natural conversation flows between your applications and users • Automate interactions with end users • Common applications • virtual agents • chat bots • Trainable through web application, import of CSV files, or web API
36.
© 2018 Rogue
Wave Software, Inc. All Rights Reserved. 36 Assistant: Where to get help
37.
© 2018 Rogue
Wave Software, Inc. All Rights Reserved. 37 Watson Assistant: Intents – what are they? • Purpose or goal expressed in a customer's input • answering a question • placing an order • processing a bill payment • canceling a process • turning something on • turning something off • Watson recognizes the intent expressed in input • Uses intent to choose appropriate dialog flow for responding to it
38.
© 2018 Rogue
Wave Software, Inc. All Rights Reserved. 38 Watson Assistant: Intents - training • Train Watson with minimum of five example statements • More is better • Best case: real user statements or questions for examples of intent • Not necessary for examples to work with the same aspect of your system; the important thing is they express intent • Example: finding the location of something (#find_location intent) • Customers, Employees, and Offices have locations • Employees are associated with Office location. • Where is customer Atelier graphique? • Where is customer Dragon Souveniers located? • What city is customer Diecast Classics headquartered in? • Customer Herkku Gifts is located where? • The location of William Patterson is where? • Find Mary Patterson? • What is the location of Julie Firrelli?
39.
© 2018 Rogue
Wave Software, Inc. All Rights Reserved. 39 Watson Assistant: Entities • Represent a class of object or a data type relevant to a user's purpose • Recognizes entities mentioned in the user's input • Conversation service uses entities to choose the specific actions to take to fulfill an intent. • Entities clarify a user's intent. • Different entity values trigger different responses for the same intent. • Entities for which there is a location: • Employees • Diane Murphy • Mary Patterson, … • Customers • Technics Stores Inc. • Herkku Gifts…
40.
© 2018 Rogue
Wave Software, Inc. All Rights Reserved. 40 Dialog Flow
41.
© 2018 Rogue
Wave Software, Inc. All Rights Reserved. 41 Conversation Dialog Flow (cont’d)
42.
© 2018 Rogue
Wave Software, Inc. All Rights Reserved. 42
43.
© 2018 Rogue
Wave Software, Inc. All Rights Reserved. 43
44.
© 2018 Rogue
Wave Software, Inc. All Rights Reserved. 44 Conversation Dialog Flow (cont’d)
45.
© 2018 Rogue
Wave Software, Inc. All Rights Reserved. 45 Testing Conversation Flow
46.
© 2018 Rogue
Wave Software, Inc. All Rights Reserved. 46 Where to go from here? • Next Phase • Add more to Assistant instance, for workflow and context, and “flow” to appropriate action, driving appropriate DB queries • Use API to build and modify Assistant Dialog • Making programmatic calls from an Assistant dialog node • Improve recognition of Speech-to-Text • Using spotted key words, parse text files and build SQL queries? • Follow-on research • Natural Language Processing • Trend analysis, perhaps unexpected correlations (need more realistic data and a much larger data set) • Other Watson services
47.
© 2018 Rogue
Wave Software, Inc. All Rights Reserved. 47 So, who is this guy? • Clark Everetts • Rogue Wave Software (acquired Zend 2015) • PHP since 2005 • Professional Services Consultant • Architecture & Performance Audits • PHP, Zend Framework Training • Zend Server • App Development, Best Practices • Many moons ago: missile launch control, space station embedded software • clark.everetts@roguewave.com • @clarkphp on Twitter
48.
© 2018 Rogue
Wave Software, Inc. All Rights Reserved. 48 THANK-YOU Stay in touch! clark.everetts@roguewave.com @clarkphp Source code will be at https://github.com/clarkphp/watson-classic-models Your feedback is invaluable! https://joind.in/talk/6a1fe
Download now