SlideShare a Scribd company logo
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)

More Related Content

What's hot

IEEE latincom2012
IEEE latincom2012IEEE latincom2012
IEEE latincom2012
jmillan_slideshare
 
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
AWS Germany
 
SoundCloud Cocoa API Wrapper
SoundCloud Cocoa API WrapperSoundCloud Cocoa API Wrapper
SoundCloud Cocoa API Wrapper
stigi
 
Building a modern SaaS in 2020
Building a modern SaaS in 2020Building a modern SaaS in 2020
Building a modern SaaS in 2020
Nikolay 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 AWS
Amazon 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 Go
Nikolay 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 Bluetooth
Charles Y. Choi
 
Evolving big microservice architectures
Evolving big microservice architecturesEvolving big microservice architectures
Evolving big microservice architectures
Nikolay Stoitsev
 
CI/CD on AWS
CI/CD on AWSCI/CD on AWS
CI/CD on AWS
Amazon Web Services
 
Bluetooth Over-The-Air Firmware Update
Bluetooth Over-The-Air Firmware UpdateBluetooth Over-The-Air Firmware Update
Bluetooth Over-The-Air Firmware Update
Ramin 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 Hamburg
Vadym 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 Time
Amazon 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 2017
Amazon 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 Swift
Chris 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 Tage
Vadym 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 AWS
ColdFusionConference
 

What's hot (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
 

Similar to 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 Web
Jeremy 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 Developers
Viktor Gamov
 
PDC Highlights
PDC HighlightsPDC Highlights
PDC Highlights
MS Innovation Days
 
vlavrynovych - WebSockets Presentation
vlavrynovych - WebSockets Presentationvlavrynovych - WebSockets Presentation
vlavrynovych - WebSockets Presentation
Volodymyr Lavrynovych
 
Enhancing Mobile User Experience with WebSocket
Enhancing Mobile User Experience with WebSocketEnhancing Mobile User Experience with WebSocket
Enhancing Mobile User Experience with WebSocket
Mauricio "Maltron" Leal
 
Lab view web vis
Lab view web visLab view web vis
Lab view web vis
Metis Automation Ltd
 
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
Jeremy 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 streaming
Matteo Bonifazi
 
Building interactivity with websockets
Building interactivity with websocketsBuilding interactivity with websockets
Building interactivity with websockets
Wim Godden
 
WebSockets in JEE 7
WebSockets in JEE 7WebSockets in JEE 7
WebSockets in JEE 7
Shahzad Badar
 
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
anynines GmbH
 
Pushing Datatothe Browserwith Comet Ajax W
Pushing Datatothe Browserwith Comet Ajax WPushing Datatothe Browserwith Comet Ajax W
Pushing Datatothe Browserwith Comet Ajax W
rajivmordani
 
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
Alexandre 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 Android
Alessandro 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 Integration
Sandro Parisi
 
2015 Q4 webrtc standards update
2015 Q4 webrtc standards update2015 Q4 webrtc standards update
2015 Q4 webrtc standards update
Alexandre Gouaillard
 
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
IBM 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
 

Similar to 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...
 

Recently uploaded

Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
Claudio Di Ciccio
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
IndexBug
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 

Recently uploaded (20)

Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 

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)