SlideShare une entreprise Scribd logo
1  sur  52
Télécharger pour lire hors ligne
WebRTC Invades the Doctor’s Office
Jeff Sloyer
Developer Advocate
IBM Bluemix

@jsloyer
WebRTC Invades the Doctor’s Office
s://releaseblueprints.ibm.com/download/attachments/34868360/Green64.png?version=1&modificationDate=1392659234814
RUN APPS
YOUR WAY
What is Bluemix?
CATALOG OF
SERVICES / APIs
FLEXIBLE
TOOLING
s://releaseblueprints.ibm.com/download/attachments/34868360/Green64.png?version=1&modificationDate=1392659234814
RUN APPS
YOUR WAY
What is Bluemix?
CATALOG OF
SERVICES / APIs
FLEXIBLE
TOOLING
Instant Runtimes
Containers
VMs
Partner
IBM
Your Own
Open Source
Or Integrate Your Own
Use Ours
Web Page
Patient
1. Click to call
Doctor
Web Page
Patient
1. Click to call
Doctor
Twilio Video Chat
2. Initiate
WebRTC call
Web Page
Patient
1. Click to call
Doctor
Twilio Video Chat
2. Initiate
WebRTC call
Doctor
3. Doctor
comes online
for
appointment
Web Page
Patient
1. Click to call
Doctor
Twilio Video Chat
2. Initiate
WebRTC call
Doctor
3. Doctor
comes online
for
appointment
4. Call
established
Web Page
Patient
1. Click to call
Doctor
Twilio Video Chat
2. Initiate
WebRTC call
Doctor
3. Doctor
comes online
for
appointment
4. Call
established
5. Doctor and
patient video
chat
Web Page
Patient
1. Click to call
Doctor
Twilio Video Chat
2. Initiate
WebRTC call
Doctor
3. Doctor
comes online
for
appointment
4. Call
established
Node.Js app in Bluemix
.js6. Patient audio stream
sent over web sockets
to node backend
5. Doctor and
patient video
chat
Web Page
Patient
1. Click to call
Doctor
Twilio Video Chat
2. Initiate
WebRTC call
Doctor
3. Doctor
comes online
for
appointment
4. Call
established
Node.Js app in Bluemix
.js6. Patient audio stream
sent over web sockets
to node backend
Watson Speech
to Text
7. Patient audio stream
sent over web sockets
to IBM Watson
5. Doctor and
patient video
chat
Web Page
Patient
1. Click to call
Doctor
Twilio Video Chat
2. Initiate
WebRTC call
Doctor
3. Doctor
comes online
for
appointment
4. Call
established
Node.Js app in Bluemix
.js6. Patient audio stream
sent over web sockets
to node backend
Watson Speech
to Text
7. Patient audio stream
sent over web sockets
to IBM Watson
8. Audio transcribed in
real time
5. Doctor and
patient video
chat
Web Page
Patient
1. Click to call
Doctor
Twilio Video Chat
2. Initiate
WebRTC call
Doctor
3. Doctor
comes online
for
appointment
4. Call
established
Node.Js app in Bluemix
.js6. Patient audio stream
sent over web sockets
to node backend
Watson Speech
to Text
7. Patient audio stream
sent over web sockets
to IBM Watson
8. Audio transcribed in
real time
Cloudant NoSQL DB
9. Transcribed audio is
stored
5. Doctor and
patient video
chat
Web Page
Patient
1. Click to call
Doctor
Twilio Video Chat
2. Initiate
WebRTC call
Doctor
3. Doctor
comes online
for
appointment
4. Call
established
Node.Js app in Bluemix
.js6. Patient audio stream
sent over web sockets
to node backend
Watson Speech
to Text
7. Patient audio stream
sent over web sockets
to IBM Watson
8. Audio transcribed in
real time
Cloudant NoSQL DB
9. Transcribed audio is
stored
5. Doctor and
patient video
chat
10. Determine personality of
the patent
Watson Personality
Insights
Web Page
Patient
1. Click to call
Doctor
Twilio Video Chat
2. Initiate
WebRTC call
Doctor
3. Doctor
comes online
for
appointment
4. Call
established
Node.Js app in Bluemix
.js6. Patient audio stream
sent over web sockets
to node backend
Watson Speech
to Text
7. Patient audio stream
sent over web sockets
to IBM Watson
8. Audio transcribed in
real time
Cloudant NoSQL DB
9. Transcribed audio is
stored
5. Doctor and
patient video
chat
11. Transcribed audio is
sent back to the doctor
in real-time
10. Determine personality of
the patent
Watson Personality
Insights
Web Page
Patient
1. Click to call
Doctor
Twilio Video Chat
2. Initiate
WebRTC call
Doctor
3. Doctor
comes online
for
appointment
4. Call
established
Node.Js app in Bluemix
.js6. Patient audio stream
sent over web sockets
to node backend
Watson Speech
to Text
7. Patient audio stream
sent over web sockets
to IBM Watson
8. Audio transcribed in
real time
Cloudant NoSQL DB
9. Transcribed audio is
stored
5. Doctor and
patient video
chat
11. Transcribed audio is
sent back to the doctor
in real-time
10. Determine personality of
the patent
Watson Personality
Insights
Web Page
Patient
1. Click to call
Doctor
Twilio Video Chat
2. Initiate
WebRTC call
Doctor
3. Doctor
comes online
for
appointment
4. Call
established
Node.Js app in Bluemix
.js6. Patient audio stream
sent over web sockets
to node backend
Watson Speech
to Text
7. Patient audio stream
sent over web sockets
to IBM Watson
8. Audio transcribed in
real time
Cloudant NoSQL DB
9. Transcribed audio is
stored
5. Doctor and
patient video
chat
11. Transcribed audio is
sent back to the doctor
in real-time
10. Determine personality of
the patent
Watson Personality
Insights
I
Image Source: Shutterstock
WebRTC - iOS and the browser
I
Twilio Javascript SDK
Image Source: Shutterstock
WebRTC - iOS and the browser
Twilio iOS SDK
Image Source: Shutterstock
Image Source: Shutterstock
Built a solution in
3 days…
Image Source: Shutterstock
Image Source: Shutterstock
Code time!
Record the local stream
function startRecording(myStream) {
blah = myStream;
audioContext = new AudioContext();
var gain = audioContext.createGain();
var audioInput = audioContext.createMediaStreamSource(myStream);
audioInput.connect(gain);
microphone = audioContext.createScriptProcessor(bufferSize, inputChannels,
outputChannels);
microphone.onaudioprocess = _onaudioprocess.bind(this);
gain.connect(microphone);
microphone.connect(audioContext.destination);
Open a socket to our Node.Js app
mySocket = io.connect();
mySocket.on('connect', function() {
console.log('socket.onconnect()');
connected = true;
onstart();
});
mySocket.on('message', function(msg){
console.log(msg);
//console.log('demo.onresult()');
showResult(msg, "local");
});
}
Convert the audio to PCM
function _onaudioprocess(data) {
// Check the data to see if we're just getting 0s
// (the user isn't saying anything)
var chan = data.inputBuffer.getChannelData(0);
onAudio(_exportDataBuffer(new Float32Array(chan)));
}
Emit a web socket message
function onAudio(data) {
if (mySocket.connected) {
mySocket.emit('message', {audio: data, rate:
microphone.sampleRate});
}
};
Initiate a websocket connection from Node to
IBM Watsonsocket.on('message', function(data) {
if (!session.open) {
session.open = true;
var payload = {
session_id: session.session_id,
cookie_session: session.cookie_session,
content_type: 'audio/l16; rate=' + (data.rate || 48000),
continuous: true,
interim_results: true
};
//open a connection to ibm watson
session.req = speechToText.recognizeLive(payload, observe_results(socket, true));
//listen for result
speechToText.observeResult(payload, observe_results(socket, false));
} else if (data.disconnect) {
session.req.end();
} else {
session.req.write(data.audio);
}
});
Send transcribed text from Watson to web client
var observe_results = function(socket, recognize_end) {
var session = sessions[socket.id];
return function(err, chunk) {
if (err) {
console.log(log(socket.id), 'error:', err);
socket.emit('onerror', {
error: err
});
session.req.end();
socket.disconnect();
} else {
var transcript = (chunk && chunk.results && chunk.results.length > 0);
if (transcript && !recognize_end) {
socket.emit('message', chunk);
}
if (recognize_end) {
socket.disconnect();
}
}
};
};
Receive the transcribed text from our Node app
function showResult(data, streamLocation) {
var textElement = $("#collapse-" + patientId + " .transcript ." + streamLocation + ".text");
textElement.show();
textElement.parent().show();
//if there are transcripts
if (data.results && data.results.length > 0) {
//if is a partial transcripts
if (data.results.length === 1 ) {
var paragraph = textElement.children().last(),
text = data.results[0].alternatives[0].transcript || '';
//Capitalize first word
text = text.charAt(0).toUpperCase() + text.substring(1);
// if final results, append a new paragraph
if (data.results[0].final){
text = text.trim() + '.';
$('<p></p>').appendTo(textElement);
}
paragraph.text(text);
}
}
}
Image Source: Shutterstock
Lessons Learned…
Image Source: Shutterstock
Image Source: Shutterstock
Order for starting a
call is buggy
Image Source: Shutterstock
Image Source: Shutterstock
Issues with remote
streams support in
Chrome and Firefox
Image Source: Shutterstock
Image Source: Shutterstock
Multiple websocket
audio streams are
hard
Image Source: Shutterstock
Getting the audio
format right…
Personality of the
patient could not be
determined till after
the call
Scaling
websockets…
Image Source: Shutterstock
Spying on the media
stream
Image Source: Shutterstock
Image Source: Shutterstock
Websocket
connections
dropped to Watson
Image Source: Shutterstock
Image Source: My cat (Moose)
Questions?
Image Source: My cat (Moose)

Contenu connexe

Tendances

Amazon Elastic Container Service for Kubernetes (Amazon EKS) I AWS Dev Day 2018
Amazon Elastic Container Service for Kubernetes (Amazon EKS) I AWS Dev Day 2018Amazon Elastic Container Service for Kubernetes (Amazon EKS) I AWS Dev Day 2018
Amazon Elastic Container Service for Kubernetes (Amazon EKS) I AWS Dev Day 2018AWS Germany
 
SoundCloud Cocoa API Wrapper
SoundCloud Cocoa API WrapperSoundCloud Cocoa API Wrapper
SoundCloud Cocoa API Wrapperstigi
 
Building a modern SaaS in 2020
Building a modern SaaS in 2020Building a modern SaaS in 2020
Building a modern SaaS in 2020Nikolay Stoitsev
 
Expert Tips for Successful Kubernetes Deployment on AWS
Expert Tips for Successful Kubernetes Deployment on AWSExpert Tips for Successful Kubernetes Deployment on AWS
Expert Tips for Successful Kubernetes Deployment on AWSAmazon Web Services
 
ISTA 2019 - Migrating data-intensive microservices from Python to Go
ISTA 2019 - Migrating data-intensive microservices from Python to GoISTA 2019 - Migrating data-intensive microservices from Python to Go
ISTA 2019 - Migrating data-intensive microservices from Python to GoNikolay Stoitsev
 
SV iOS Meetup Slides: YmsCoreBluetooth and Deep Core Bluetooth
SV iOS Meetup Slides: YmsCoreBluetooth and Deep Core BluetoothSV iOS Meetup Slides: YmsCoreBluetooth and Deep Core Bluetooth
SV iOS Meetup Slides: YmsCoreBluetooth and Deep Core BluetoothCharles Y. Choi
 
Evolving big microservice architectures
Evolving big microservice architecturesEvolving big microservice architectures
Evolving big microservice architecturesNikolay Stoitsev
 
Bluetooth Over-The-Air Firmware Update
Bluetooth Over-The-Air Firmware UpdateBluetooth Over-The-Air Firmware Update
Bluetooth Over-The-Air Firmware UpdateRamin Firoozye
 
Adopting Java for the Serverless world at JUG Hamburg
Adopting Java for the Serverless world at  JUG HamburgAdopting Java for the Serverless world at  JUG Hamburg
Adopting Java for the Serverless world at JUG HamburgVadym Kazulkin
 
AWS Summit Auckland - Moving MS .NET Applications One Container at a Time
AWS Summit Auckland - Moving MS .NET Applications One Container at a TimeAWS Summit Auckland - Moving MS .NET Applications One Container at a Time
AWS Summit Auckland - Moving MS .NET Applications One Container at a TimeAmazon Web Services
 
Container Networking Deep Dive with Amazon ECS - CON401 - re:Invent 2017
Container Networking Deep Dive with Amazon ECS - CON401 - re:Invent 2017Container Networking Deep Dive with Amazon ECS - CON401 - re:Invent 2017
Container Networking Deep Dive with Amazon ECS - CON401 - re:Invent 2017Amazon Web Services
 
FrenchKit: End to End Application Development with Swift
FrenchKit: End to End Application Development with SwiftFrenchKit: End to End Application Development with Swift
FrenchKit: End to End Application Development with SwiftChris Bailey
 
Serverless in production, an experience report (Going Serverless)
Serverless in production, an experience report (Going Serverless)Serverless in production, an experience report (Going Serverless)
Serverless in production, an experience report (Going Serverless)Yan Cui
 
Adopting Java for the Serverless world at IT Tage
Adopting Java for the Serverless world at IT TageAdopting Java for the Serverless world at IT Tage
Adopting Java for the Serverless world at IT TageVadym Kazulkin
 
Supporting Asterisk AGI apps (ClueCon 2010)
Supporting Asterisk AGI apps (ClueCon 2010)Supporting Asterisk AGI apps (ClueCon 2010)
Supporting Asterisk AGI apps (ClueCon 2010)troyd
 
Accessible Video Anywhere with ColdFusion an AWS
Accessible Video Anywhere with ColdFusion an AWSAccessible Video Anywhere with ColdFusion an AWS
Accessible Video Anywhere with ColdFusion an AWSColdFusionConference
 

Tendances (18)

IEEE latincom2012
IEEE latincom2012IEEE latincom2012
IEEE latincom2012
 
Amazon Elastic Container Service for Kubernetes (Amazon EKS) I AWS Dev Day 2018
Amazon Elastic Container Service for Kubernetes (Amazon EKS) I AWS Dev Day 2018Amazon Elastic Container Service for Kubernetes (Amazon EKS) I AWS Dev Day 2018
Amazon Elastic Container Service for Kubernetes (Amazon EKS) I AWS Dev Day 2018
 
SoundCloud Cocoa API Wrapper
SoundCloud Cocoa API WrapperSoundCloud Cocoa API Wrapper
SoundCloud Cocoa API Wrapper
 
Building a modern SaaS in 2020
Building a modern SaaS in 2020Building a modern SaaS in 2020
Building a modern SaaS in 2020
 
Expert Tips for Successful Kubernetes Deployment on AWS
Expert Tips for Successful Kubernetes Deployment on AWSExpert Tips for Successful Kubernetes Deployment on AWS
Expert Tips for Successful Kubernetes Deployment on AWS
 
ISTA 2019 - Migrating data-intensive microservices from Python to Go
ISTA 2019 - Migrating data-intensive microservices from Python to GoISTA 2019 - Migrating data-intensive microservices from Python to Go
ISTA 2019 - Migrating data-intensive microservices from Python to Go
 
SV iOS Meetup Slides: YmsCoreBluetooth and Deep Core Bluetooth
SV iOS Meetup Slides: YmsCoreBluetooth and Deep Core BluetoothSV iOS Meetup Slides: YmsCoreBluetooth and Deep Core Bluetooth
SV iOS Meetup Slides: YmsCoreBluetooth and Deep Core Bluetooth
 
Evolving big microservice architectures
Evolving big microservice architecturesEvolving big microservice architectures
Evolving big microservice architectures
 
CI/CD on AWS
CI/CD on AWSCI/CD on AWS
CI/CD on AWS
 
Bluetooth Over-The-Air Firmware Update
Bluetooth Over-The-Air Firmware UpdateBluetooth Over-The-Air Firmware Update
Bluetooth Over-The-Air Firmware Update
 
Adopting Java for the Serverless world at JUG Hamburg
Adopting Java for the Serverless world at  JUG HamburgAdopting Java for the Serverless world at  JUG Hamburg
Adopting Java for the Serverless world at JUG Hamburg
 
AWS Summit Auckland - Moving MS .NET Applications One Container at a Time
AWS Summit Auckland - Moving MS .NET Applications One Container at a TimeAWS Summit Auckland - Moving MS .NET Applications One Container at a Time
AWS Summit Auckland - Moving MS .NET Applications One Container at a Time
 
Container Networking Deep Dive with Amazon ECS - CON401 - re:Invent 2017
Container Networking Deep Dive with Amazon ECS - CON401 - re:Invent 2017Container Networking Deep Dive with Amazon ECS - CON401 - re:Invent 2017
Container Networking Deep Dive with Amazon ECS - CON401 - re:Invent 2017
 
FrenchKit: End to End Application Development with Swift
FrenchKit: End to End Application Development with SwiftFrenchKit: End to End Application Development with Swift
FrenchKit: End to End Application Development with Swift
 
Serverless in production, an experience report (Going Serverless)
Serverless in production, an experience report (Going Serverless)Serverless in production, an experience report (Going Serverless)
Serverless in production, an experience report (Going Serverless)
 
Adopting Java for the Serverless world at IT Tage
Adopting Java for the Serverless world at IT TageAdopting Java for the Serverless world at IT Tage
Adopting Java for the Serverless world at IT Tage
 
Supporting Asterisk AGI apps (ClueCon 2010)
Supporting Asterisk AGI apps (ClueCon 2010)Supporting Asterisk AGI apps (ClueCon 2010)
Supporting Asterisk AGI apps (ClueCon 2010)
 
Accessible Video Anywhere with ColdFusion an AWS
Accessible Video Anywhere with ColdFusion an AWSAccessible Video Anywhere with ColdFusion an AWS
Accessible Video Anywhere with ColdFusion an AWS
 

Similaire à KrankyGeek 2015 - Mixing Data and Video - IBM Bluemix, Watson, and Twilio

The Windows Runtime and the Web
The Windows Runtime and the WebThe Windows Runtime and the Web
The Windows Runtime and the WebJeremy Likness
 
WebSockets: The Current State of the Most Valuable HTML5 API for Java Developers
WebSockets: The Current State of the Most Valuable HTML5 API for Java DevelopersWebSockets: The Current State of the Most Valuable HTML5 API for Java Developers
WebSockets: The Current State of the Most Valuable HTML5 API for Java DevelopersViktor Gamov
 
vlavrynovych - WebSockets Presentation
vlavrynovych - WebSockets Presentationvlavrynovych - WebSockets Presentation
vlavrynovych - WebSockets PresentationVolodymyr Lavrynovych
 
Enhancing Mobile User Experience with WebSocket
Enhancing Mobile User Experience with WebSocketEnhancing Mobile User Experience with WebSocket
Enhancing Mobile User Experience with WebSocketMauricio "Maltron" Leal
 
WinRT and the Web: Keeping Windows Store Apps Alive and Connected
WinRT and the Web: Keeping Windows Store Apps Alive and ConnectedWinRT and the Web: Keeping Windows Store Apps Alive and Connected
WinRT and the Web: Keeping Windows Store Apps Alive and ConnectedJeremy Likness
 
The unconventional devices for the Android video streaming
The unconventional devices for the Android video streamingThe unconventional devices for the Android video streaming
The unconventional devices for the Android video streamingMatteo Bonifazi
 
Building interactivity with websockets
Building interactivity with websocketsBuilding interactivity with websockets
Building interactivity with websocketsWim Godden
 
Introduction into Cloud Foundry and Bosh | anynines
Introduction into Cloud Foundry and Bosh | anyninesIntroduction into Cloud Foundry and Bosh | anynines
Introduction into Cloud Foundry and Bosh | anyninesanynines GmbH
 
Pushing Datatothe Browserwith Comet Ajax W
Pushing Datatothe Browserwith Comet Ajax WPushing Datatothe Browserwith Comet Ajax W
Pushing Datatothe Browserwith Comet Ajax Wrajivmordani
 
Real-Time Communication Testing Evolution with WebRTC
Real-Time Communication Testing Evolution with WebRTCReal-Time Communication Testing Evolution with WebRTC
Real-Time Communication Testing Evolution with WebRTCAlexandre Gouaillard
 
Come sta la nostra applicazione? Un viaggio alla scoperta degli Health Check ...
Come sta la nostra applicazione? Un viaggio alla scoperta degli Health Check ...Come sta la nostra applicazione? Un viaggio alla scoperta degli Health Check ...
Come sta la nostra applicazione? Un viaggio alla scoperta degli Health Check ...Andrea Dottor
 
The unconventional devices for the video streaming in Android
The unconventional devices for the video streaming in AndroidThe unconventional devices for the video streaming in Android
The unconventional devices for the video streaming in AndroidAlessandro Martellucci
 
Why And When Should We Consider Stream Processing In Our Solutions Teqnation ...
Why And When Should We Consider Stream Processing In Our Solutions Teqnation ...Why And When Should We Consider Stream Processing In Our Solutions Teqnation ...
Why And When Should We Consider Stream Processing In Our Solutions Teqnation ...Soroosh Khodami
 
Web Contact System Overview - Cisco Integration
Web Contact System Overview - Cisco IntegrationWeb Contact System Overview - Cisco Integration
Web Contact System Overview - Cisco IntegrationSandro Parisi
 
Building with Watson - Serverless Chatbots with PubNub and Conversation
Building with Watson - Serverless Chatbots with PubNub and ConversationBuilding with Watson - Serverless Chatbots with PubNub and Conversation
Building with Watson - Serverless Chatbots with PubNub and ConversationIBM Watson
 
Automated Abstraction of Flow of Control in a System of Distributed Software...
Automated Abstraction of Flow of Control in a System of Distributed  Software...Automated Abstraction of Flow of Control in a System of Distributed  Software...
Automated Abstraction of Flow of Control in a System of Distributed Software...nimak
 

Similaire à KrankyGeek 2015 - Mixing Data and Video - IBM Bluemix, Watson, and Twilio (20)

The Windows Runtime and the Web
The Windows Runtime and the WebThe Windows Runtime and the Web
The Windows Runtime and the Web
 
WebSockets: The Current State of the Most Valuable HTML5 API for Java Developers
WebSockets: The Current State of the Most Valuable HTML5 API for Java DevelopersWebSockets: The Current State of the Most Valuable HTML5 API for Java Developers
WebSockets: The Current State of the Most Valuable HTML5 API for Java Developers
 
PDC Highlights
PDC HighlightsPDC Highlights
PDC Highlights
 
vlavrynovych - WebSockets Presentation
vlavrynovych - WebSockets Presentationvlavrynovych - WebSockets Presentation
vlavrynovych - WebSockets Presentation
 
Enhancing Mobile User Experience with WebSocket
Enhancing Mobile User Experience with WebSocketEnhancing Mobile User Experience with WebSocket
Enhancing Mobile User Experience with WebSocket
 
Lab view web vis
Lab view web visLab view web vis
Lab view web vis
 
WinRT and the Web: Keeping Windows Store Apps Alive and Connected
WinRT and the Web: Keeping Windows Store Apps Alive and ConnectedWinRT and the Web: Keeping Windows Store Apps Alive and Connected
WinRT and the Web: Keeping Windows Store Apps Alive and Connected
 
The unconventional devices for the Android video streaming
The unconventional devices for the Android video streamingThe unconventional devices for the Android video streaming
The unconventional devices for the Android video streaming
 
Building interactivity with websockets
Building interactivity with websocketsBuilding interactivity with websockets
Building interactivity with websockets
 
WebSockets in JEE 7
WebSockets in JEE 7WebSockets in JEE 7
WebSockets in JEE 7
 
Introduction into Cloud Foundry and Bosh | anynines
Introduction into Cloud Foundry and Bosh | anyninesIntroduction into Cloud Foundry and Bosh | anynines
Introduction into Cloud Foundry and Bosh | anynines
 
Pushing Datatothe Browserwith Comet Ajax W
Pushing Datatothe Browserwith Comet Ajax WPushing Datatothe Browserwith Comet Ajax W
Pushing Datatothe Browserwith Comet Ajax W
 
Real-Time Communication Testing Evolution with WebRTC
Real-Time Communication Testing Evolution with WebRTCReal-Time Communication Testing Evolution with WebRTC
Real-Time Communication Testing Evolution with WebRTC
 
Come sta la nostra applicazione? Un viaggio alla scoperta degli Health Check ...
Come sta la nostra applicazione? Un viaggio alla scoperta degli Health Check ...Come sta la nostra applicazione? Un viaggio alla scoperta degli Health Check ...
Come sta la nostra applicazione? Un viaggio alla scoperta degli Health Check ...
 
The unconventional devices for the video streaming in Android
The unconventional devices for the video streaming in AndroidThe unconventional devices for the video streaming in Android
The unconventional devices for the video streaming in Android
 
Why And When Should We Consider Stream Processing In Our Solutions Teqnation ...
Why And When Should We Consider Stream Processing In Our Solutions Teqnation ...Why And When Should We Consider Stream Processing In Our Solutions Teqnation ...
Why And When Should We Consider Stream Processing In Our Solutions Teqnation ...
 
Web Contact System Overview - Cisco Integration
Web Contact System Overview - Cisco IntegrationWeb Contact System Overview - Cisco Integration
Web Contact System Overview - Cisco Integration
 
2015 Q4 webrtc standards update
2015 Q4 webrtc standards update2015 Q4 webrtc standards update
2015 Q4 webrtc standards update
 
Building with Watson - Serverless Chatbots with PubNub and Conversation
Building with Watson - Serverless Chatbots with PubNub and ConversationBuilding with Watson - Serverless Chatbots with PubNub and Conversation
Building with Watson - Serverless Chatbots with PubNub and Conversation
 
Automated Abstraction of Flow of Control in a System of Distributed Software...
Automated Abstraction of Flow of Control in a System of Distributed  Software...Automated Abstraction of Flow of Control in a System of Distributed  Software...
Automated Abstraction of Flow of Control in a System of Distributed Software...
 

Dernier

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
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
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 

Dernier (20)

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
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...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 

KrankyGeek 2015 - Mixing Data and Video - IBM Bluemix, Watson, and Twilio

  • 1. WebRTC Invades the Doctor’s Office
  • 3. WebRTC Invades the Doctor’s Office
  • 5. s://releaseblueprints.ibm.com/download/attachments/34868360/Green64.png?version=1&modificationDate=1392659234814 RUN APPS YOUR WAY What is Bluemix? CATALOG OF SERVICES / APIs FLEXIBLE TOOLING Instant Runtimes Containers VMs Partner IBM Your Own Open Source Or Integrate Your Own Use Ours
  • 6.
  • 7. Web Page Patient 1. Click to call Doctor
  • 8. Web Page Patient 1. Click to call Doctor Twilio Video Chat 2. Initiate WebRTC call
  • 9. Web Page Patient 1. Click to call Doctor Twilio Video Chat 2. Initiate WebRTC call Doctor 3. Doctor comes online for appointment
  • 10. Web Page Patient 1. Click to call Doctor Twilio Video Chat 2. Initiate WebRTC call Doctor 3. Doctor comes online for appointment 4. Call established
  • 11. Web Page Patient 1. Click to call Doctor Twilio Video Chat 2. Initiate WebRTC call Doctor 3. Doctor comes online for appointment 4. Call established 5. Doctor and patient video chat
  • 12. Web Page Patient 1. Click to call Doctor Twilio Video Chat 2. Initiate WebRTC call Doctor 3. Doctor comes online for appointment 4. Call established Node.Js app in Bluemix .js6. Patient audio stream sent over web sockets to node backend 5. Doctor and patient video chat
  • 13. Web Page Patient 1. Click to call Doctor Twilio Video Chat 2. Initiate WebRTC call Doctor 3. Doctor comes online for appointment 4. Call established Node.Js app in Bluemix .js6. Patient audio stream sent over web sockets to node backend Watson Speech to Text 7. Patient audio stream sent over web sockets to IBM Watson 5. Doctor and patient video chat
  • 14. Web Page Patient 1. Click to call Doctor Twilio Video Chat 2. Initiate WebRTC call Doctor 3. Doctor comes online for appointment 4. Call established Node.Js app in Bluemix .js6. Patient audio stream sent over web sockets to node backend Watson Speech to Text 7. Patient audio stream sent over web sockets to IBM Watson 8. Audio transcribed in real time 5. Doctor and patient video chat
  • 15. Web Page Patient 1. Click to call Doctor Twilio Video Chat 2. Initiate WebRTC call Doctor 3. Doctor comes online for appointment 4. Call established Node.Js app in Bluemix .js6. Patient audio stream sent over web sockets to node backend Watson Speech to Text 7. Patient audio stream sent over web sockets to IBM Watson 8. Audio transcribed in real time Cloudant NoSQL DB 9. Transcribed audio is stored 5. Doctor and patient video chat
  • 16. Web Page Patient 1. Click to call Doctor Twilio Video Chat 2. Initiate WebRTC call Doctor 3. Doctor comes online for appointment 4. Call established Node.Js app in Bluemix .js6. Patient audio stream sent over web sockets to node backend Watson Speech to Text 7. Patient audio stream sent over web sockets to IBM Watson 8. Audio transcribed in real time Cloudant NoSQL DB 9. Transcribed audio is stored 5. Doctor and patient video chat 10. Determine personality of the patent Watson Personality Insights
  • 17. Web Page Patient 1. Click to call Doctor Twilio Video Chat 2. Initiate WebRTC call Doctor 3. Doctor comes online for appointment 4. Call established Node.Js app in Bluemix .js6. Patient audio stream sent over web sockets to node backend Watson Speech to Text 7. Patient audio stream sent over web sockets to IBM Watson 8. Audio transcribed in real time Cloudant NoSQL DB 9. Transcribed audio is stored 5. Doctor and patient video chat 11. Transcribed audio is sent back to the doctor in real-time 10. Determine personality of the patent Watson Personality Insights
  • 18. Web Page Patient 1. Click to call Doctor Twilio Video Chat 2. Initiate WebRTC call Doctor 3. Doctor comes online for appointment 4. Call established Node.Js app in Bluemix .js6. Patient audio stream sent over web sockets to node backend Watson Speech to Text 7. Patient audio stream sent over web sockets to IBM Watson 8. Audio transcribed in real time Cloudant NoSQL DB 9. Transcribed audio is stored 5. Doctor and patient video chat 11. Transcribed audio is sent back to the doctor in real-time 10. Determine personality of the patent Watson Personality Insights
  • 19. Web Page Patient 1. Click to call Doctor Twilio Video Chat 2. Initiate WebRTC call Doctor 3. Doctor comes online for appointment 4. Call established Node.Js app in Bluemix .js6. Patient audio stream sent over web sockets to node backend Watson Speech to Text 7. Patient audio stream sent over web sockets to IBM Watson 8. Audio transcribed in real time Cloudant NoSQL DB 9. Transcribed audio is stored 5. Doctor and patient video chat 11. Transcribed audio is sent back to the doctor in real-time 10. Determine personality of the patent Watson Personality Insights
  • 20. I Image Source: Shutterstock WebRTC - iOS and the browser
  • 21. I Twilio Javascript SDK Image Source: Shutterstock WebRTC - iOS and the browser Twilio iOS SDK
  • 23. Image Source: Shutterstock Built a solution in 3 days…
  • 26. Record the local stream function startRecording(myStream) { blah = myStream; audioContext = new AudioContext(); var gain = audioContext.createGain(); var audioInput = audioContext.createMediaStreamSource(myStream); audioInput.connect(gain); microphone = audioContext.createScriptProcessor(bufferSize, inputChannels, outputChannels); microphone.onaudioprocess = _onaudioprocess.bind(this); gain.connect(microphone); microphone.connect(audioContext.destination);
  • 27. Open a socket to our Node.Js app mySocket = io.connect(); mySocket.on('connect', function() { console.log('socket.onconnect()'); connected = true; onstart(); }); mySocket.on('message', function(msg){ console.log(msg); //console.log('demo.onresult()'); showResult(msg, "local"); }); }
  • 28. Convert the audio to PCM function _onaudioprocess(data) { // Check the data to see if we're just getting 0s // (the user isn't saying anything) var chan = data.inputBuffer.getChannelData(0); onAudio(_exportDataBuffer(new Float32Array(chan))); }
  • 29. Emit a web socket message function onAudio(data) { if (mySocket.connected) { mySocket.emit('message', {audio: data, rate: microphone.sampleRate}); } };
  • 30. Initiate a websocket connection from Node to IBM Watsonsocket.on('message', function(data) { if (!session.open) { session.open = true; var payload = { session_id: session.session_id, cookie_session: session.cookie_session, content_type: 'audio/l16; rate=' + (data.rate || 48000), continuous: true, interim_results: true }; //open a connection to ibm watson session.req = speechToText.recognizeLive(payload, observe_results(socket, true)); //listen for result speechToText.observeResult(payload, observe_results(socket, false)); } else if (data.disconnect) { session.req.end(); } else { session.req.write(data.audio); } });
  • 31. Send transcribed text from Watson to web client var observe_results = function(socket, recognize_end) { var session = sessions[socket.id]; return function(err, chunk) { if (err) { console.log(log(socket.id), 'error:', err); socket.emit('onerror', { error: err }); session.req.end(); socket.disconnect(); } else { var transcript = (chunk && chunk.results && chunk.results.length > 0); if (transcript && !recognize_end) { socket.emit('message', chunk); } if (recognize_end) { socket.disconnect(); } } }; };
  • 32. Receive the transcribed text from our Node app function showResult(data, streamLocation) { var textElement = $("#collapse-" + patientId + " .transcript ." + streamLocation + ".text"); textElement.show(); textElement.parent().show(); //if there are transcripts if (data.results && data.results.length > 0) { //if is a partial transcripts if (data.results.length === 1 ) { var paragraph = textElement.children().last(), text = data.results[0].alternatives[0].transcript || ''; //Capitalize first word text = text.charAt(0).toUpperCase() + text.substring(1); // if final results, append a new paragraph if (data.results[0].final){ text = text.trim() + '.'; $('<p></p>').appendTo(textElement); } paragraph.text(text); } } }
  • 36. Order for starting a call is buggy Image Source: Shutterstock
  • 38. Issues with remote streams support in Chrome and Firefox Image Source: Shutterstock
  • 40. Multiple websocket audio streams are hard Image Source: Shutterstock
  • 41.
  • 43.
  • 44. Personality of the patient could not be determined till after the call
  • 45.
  • 48. Spying on the media stream Image Source: Shutterstock
  • 51. Image Source: My cat (Moose)