We are less than a month away from the IBM World of Watson main stage
event. On May 5-6th some of the top business leaders, thinkers and
developers will converge in NYC’s Silicon Alley to talk the future of
cognitive computing and how businesses around the world are using IBM
Watson services to fuel next level innovation across different
industries.
Registration is filling up fast and we want to make sure you’re on the list!
Here are the top five reasons why we think you should be there:
1. Get access to the IBM Watson Dev team responsible for emerging cognitive services
2. Meet the top IBM executives and developers responsible for IBM Watson break-through technology
3. Preview dozens of commercial apps heading to market
4. See how some of the world’s biggest companies are taking IBM Watson to scale
5. Tons of developers will be onsite to trade insights and learnings including IBM Watson’s first ever hackathon
Take advantage of the early bird rate (ends 4/15) and register today to get you place at IBM World of Watson.
Learn more about IBM Watson and current use cases on our YouTube channel. Also visit us on SlideShare
Link : https://developer.ibm.com/watson/blog/2015/04/09/5-reasons-to-attend-ibm-world-of-watson/
mercredi 22 avril 2015
lundi 20 avril 2015
IBM's supercomputer Watson wrote a cookbook, and it's coming out soon !
Watson, the IBM supercomputer best known for crushing "Jeopardy!" contestants at their own game, will publish its first-ever cookbook next week, according to CNN Money.
The book, "Cognitive Cooking with Chef Watson," is a collaboration between IBM's Watson and the Institute of Culinary Education that goes on sale April 14.
But this is far from an ordinary cookbook. This will be the first cookbook that's co-created by computer algorithms.
Around three years ago, IBM began building an "idea-generating tool" for Watson, which would let the supercomputer tap into its massive data trove to create new and interesting ideas and suggestions. IBM immediately thought food would be a great category for Watson to innovate, since everyone eats and there are literally countless combinations of meals and flavors.
According to the book, IBM taught Watson all about existing food dishes so it could learn how flavors and food chemicals interact, combine and contrast. It also learned about cultural preferences for certain foods and flavors, and it also learned about nutrition.
Once it had enough data, Watson began spewing out combinations of ingredients, which the Institute of Culinary Education helped convert those ideas into real dishes used in the book.
Around three years ago, IBM began building an "idea-generating tool" for Watson, which would let the supercomputer tap into its massive data trove to create new and interesting ideas and suggestions. IBM immediately thought food would be a great category for Watson to innovate, since everyone eats and there are literally countless combinations of meals and flavors.
According to the book, IBM taught Watson all about existing food dishes so it could learn how flavors and food chemicals interact, combine and contrast. It also learned about cultural preferences for certain foods and flavors, and it also learned about nutrition.
Once it had enough data, Watson began spewing out combinations of ingredients, which the Institute of Culinary Education helped convert those ideas into real dishes used in the book.
While there
are plenty of meals you might be accustomed to, Watson offers plenty of
novel flavor combinations you probably wouldn't have dreamt of. How
about an Indian burrito? What about Thai quiche? Or maybe some grilled
asparagus on top of some sous vide pig's feet?
Watson came up with thousands of
recipes but eventually narrowed down the options to 100; the book only
contains 65 different recipes, which are sorted by preferences and
dietary constraints, but CNN Money says IBM might have more recipes and
Watson cookbooks on the way.
Article written by Dave Smith
Apr. 10, 2015
mercredi 8 avril 2015
IBM Watson QA + Speech Recognition + Speech Synthesis = A Conversation With Your Computer
" Back in November I released a demo application here on my blog showing the IBM Watson QA Service for cognitive/natural language computing connected to the Web Speech API in
Google Chrome to have real conversational interaction with a web
application. It’s a nice demo, but it always drove me nuts that it only
worked in Chrome. Last month the IBM Watson team released 5 new services, and guess what… Speech Recognition and Speech Synthesis are included!
These two services enable you to quickly add Text-To-Speech or Speech-To-Text capability to any application. What’s a better way to show them off than by updating my existing app to leverage the new speech services?
So here it is: watsonhealthqa.mybluemix.net!
By leveraging the Watson services it can now run in any browser that supports getUserMedia (for speech recognition) and HTML5 <Audio> (for speech playback).
(Full source code available at the bottom of this post)
You can check out a video of it in action below:
If your browser doesn’t support the getUserMedia API or HTML5 <Audio>, then your mileage may vary. You can check where these features are supported with these links: <Audio>getUserMedia
Warning: This is targeting desktop browsers – HTML5 Audio is a mess on mobile devices due to limited codec support and immature APIs.
I simply added the Text To Speech and Speech To Text services to my existing Healthcare QA application that runs on Bluemix:
IBM Bluemix Dashboard
These services are available via a REST API. Once you’ve added them to your application, you can consume them easily within any of your applications.
I updated the code from my previous example in 2 ways: 1) take advantage of the Watson Node.js Wrapper that makes interacting with Watson a lot easier and 2) to take advantage of these new services services.
These two services enable you to quickly add Text-To-Speech or Speech-To-Text capability to any application. What’s a better way to show them off than by updating my existing app to leverage the new speech services?
So here it is: watsonhealthqa.mybluemix.net!
By leveraging the Watson services it can now run in any browser that supports getUserMedia (for speech recognition) and HTML5 <Audio> (for speech playback).
(Full source code available at the bottom of this post)
You can check out a video of it in action below:
If your browser doesn’t support the getUserMedia API or HTML5 <Audio>, then your mileage may vary. You can check where these features are supported with these links: <Audio>getUserMedia
Warning: This is targeting desktop browsers – HTML5 Audio is a mess on mobile devices due to limited codec support and immature APIs.
So how does this all work?
Just like the QA service, the new Text To Speech and Speech To Text services are now available in IBM Bluemix, so you can create a new application that leverages any of these services, or you can add them to any existing application.I simply added the Text To Speech and Speech To Text services to my existing Healthcare QA application that runs on Bluemix:
IBM Bluemix Dashboard
These services are available via a REST API. Once you’ve added them to your application, you can consume them easily within any of your applications.
I updated the code from my previous example in 2 ways: 1) take advantage of the Watson Node.js Wrapper that makes interacting with Watson a lot easier and 2) to take advantage of these new services services.
Watson Node.js Wrapper
Using the Watson Node.js Wrapper, you can now easily instantiate Watson services in a single line of code. For example:1.
var watson = require(
'watson-developer-cloud'
);
2.
var question_and_answer_healthcare = watson.question_and_answer(QA_CREDENTIALS);
3.
var speechToText = watson.speech_to_text(STT_CREDENTIALS);
The credentials come from your environment configuration, then you
just create instances of whichever services that you want to consume.
QA Service
The
code for consuming a service is now much simpler than the previous
version. When we want to submit a question to the Watson QA service,
you can now simply call the “ask” method on the QA service instance.
Below is my server-side code from app.js that accepts a POST submission from the browser, delegates the question to Watson, and takes the result and renders HTML using a Jade template. See the Getting Started Guide for the Watson QA Service to learn more about the wrappers for Node or Java.
QA Service
The
code for consuming a service is now much simpler than the previous
version. When we want to submit a question to the Watson QA service,
you can now simply call the “ask” method on the QA service instance.Below is my server-side code from app.js that accepts a POST submission from the browser, delegates the question to Watson, and takes the result and renders HTML using a Jade template. See the Getting Started Guide for the Watson QA Service to learn more about the wrappers for Node or Java.
01.
// Handle the form POST containing the question
02.
app.post(
'/ask'
, function(req, res){
03.
04.
// delegate to Watson
05.
question_and_answer_healthcare.ask({ text: req.body.questionText}, function (err, response) {
06.
if
(err)
07.
console.log(
'error:'
, err);
08.
else
{
09.
var response = extend({
'answers'
: response[
0
] },req.body);
10.
11.
// render the template to HTML and send it to the browser
12.
return
res.render(
'response'
, response);
13.
}
14.
});
15.
});
Compare this to the previous version, and you’ll quickly see that it is much simpler.
At
this point, we already have a functional service that can take natural
language text, submit it to Watson, and return a search result as text.
The next logical step for me was to add speech synthesis using the
Watson Text To Speech Service (TTS). Again, the Watson Node Wrapper and
Watson’s REST services make this task very simple. On the client side
you just need to set the src of an <audio> instance to the URL for
the TTS service:
On
the server you just need to synthesize the audio from the data in the
URL query string. Here’s an example how to invoke the text to speech
service directly from the Watson TTS sample app:
The Watson TTS service supports .ogg and .wav file
formats. I modified this sample slightly to return .ogg files for
Chrome and Firefox, and .wav files for other browsers. On the client
side, these are played using the HTML5 <audio> tag. You can see my modifications in the git repository.
This service uses the browser’s getUserMedia (streaming) API with socket.io on Node to stream the data back to the server with minimal latency. The best part is that you don’t have to setup any of this on your own. Just leverage the code from the sample app. Note: the getUserMedia API isn’t supported everywhere, so be advised.
On the client side you just need to create an instance of the SpeechRecognizer class in JavaScript and handle the result:
On
the server, you need to create an instance of the Watson Speech To Text
service, and setup handlers for the post request to receive the audio
stream.
Just setup your Bluemix app, clone the sample code, run NPM install and deploy your app to Bluemix using the Cloud Foundry CLI.
Release on the 04.04.2015
Written by Andrew Trice. More on Andrew here : http://java.dzone.com/users/triceam
Link to the article here : http://java.dzone.com/articles/ibm-watson-qa-speech
Speech Synthesis
At
this point, we already have a functional service that can take natural
language text, submit it to Watson, and return a search result as text.
The next logical step for me was to add speech synthesis using the
Watson Text To Speech Service (TTS). Again, the Watson Node Wrapper and
Watson’s REST services make this task very simple. On the client side
you just need to set the src of an <audio> instance to the URL for
the TTS service:
1
| < audio controls = "" autoplay = "" src = "/synthesize?text=The text that should generate the audio goes here" ></ audio > |
01.
var textToSpeech =
new
watson.text_to_speech(credentials);
02.
03.
// handle get requests
04.
app.get(
'/synthesize'
, function(req, res) {
05.
06.
// make the request to Watson to synthesize the audio file from the query text
07.
var transcript = textToSpeech.synthesize(req.query);
08.
09.
// set content-disposition header if downloading the
10.
// file instead of playing directly in the browser
11.
transcript.on(
'response'
, function(response) {
12.
console.log(response.headers);
13.
if
(req.query.download) {
14.
response.headers[
'content-disposition'
] =
'attachment; filename=transcript.ogg'
;
15.
}
16.
});
17.
18.
// pipe results back to the browser as they come in from Watson
19.
transcript.pipe(res);
20.
});
Speech Recognition
Now that we’re able to process natural language and generate speech, that last part of the solution is to recognize spoken input and turn it into text. The Watson Speech To Text (STT) service handles this for us. Just like the TTS service, the Speech To Text service also has a sample app, complete with source code to help you get started.This service uses the browser’s getUserMedia (streaming) API with socket.io on Node to stream the data back to the server with minimal latency. The best part is that you don’t have to setup any of this on your own. Just leverage the code from the sample app. Note: the getUserMedia API isn’t supported everywhere, so be advised.
On the client side you just need to create an instance of the SpeechRecognizer class in JavaScript and handle the result:
01.
var recognizer =
new
SpeechRecognizer({
02.
ws:
''
,
03.
model:
'WatsonModel'
04.
});
05.
06.
recognizer.onresult = function(data) {
07.
08.
//get the transcript from the service result data
09.
var result = data.results[data.results.length-
1
];
10.
var transcript = result.alternatives[
0
].transcript;
11.
12.
// do something with the transcript
13.
search( transcript, result.
final
);
14.
}
01.
// create an instance of the speech to text service
02.
var speechToText = watson.speech_to_text(STT_CREDENTIALS);
03.
04.
// Handle audio stream processing for speech recognition
05.
app.post(
'/'
, function(req, res) {
06.
var audio;
07.
08.
if
(req.body.url && req.body.url.indexOf(
'audio/'
) ===
0
) {
09.
// sample audio stream
10.
audio = fs.createReadStream(__dirname +
'/../public/'
+ req.body.url);
11.
}
else
{
12.
// malformed url
13.
return
res.status(
500
).json({ error:
'Malformed URL'
});
14.
}
15.
16.
// use Watson to generate a text transcript from the audio stream
17.
speechToText.recognize({audio: audio, content_type:
'audio/l16; rate=44100'
}, function(err, transcript) {
18.
if
(err)
19.
return
res.status(
500
).json({ error: err });
20.
else
21.
return
res.json(transcript);
22.
});
23.
});
Source Code
You can interact with a live instance of this application at watsonhealthqa.mybluemix.net, and complete client and server side code is available at github.com/triceam/IBMWatson-QA-Speech.Just setup your Bluemix app, clone the sample code, run NPM install and deploy your app to Bluemix using the Cloud Foundry CLI.
Release on the 04.04.2015
Written by Andrew Trice. More on Andrew here : http://java.dzone.com/users/triceam
Link to the article here : http://java.dzone.com/articles/ibm-watson-qa-speech
Inscription à :
Articles (Atom)