(music)
>> We are gonna be working with Microsoft Azure today,
and using their AI APIs.
We're actually gonna use their APIs
to upgrade our chat translator.
We're gonna actually learn together.
And so it should be pretty exciting.
Oh, my goodness. (laughs)
What Fritz? (laughs)
Holy moly. (laughs)
Wah, wah, wah.
Big thanks to Microsoft Azure.
They're sponsoring today's stream.
This is our very first sponsored stream ever.
We can try out their translator APIs,
and it uses natural language machine learning.
They really told us to check out the API.
And then at the end of the stream, after we try it out
and use it, then to give honest feedback
about like what we thought about it.
I think the translations
are going to be really, really good.
At the very least, it's gonna to be way better
(chuckles) than what we have now.
Right now, if you guys know any other foreign languages,
you can actually just type it in chat
and it'll translate if for you.
But sometimes it messes up.
It's not very good,
because right now it uses a different API.
When we switch it over to translate using the Azure API,
I think it's going to do way better.
I got everything pretty much set up,
but I only looked at the documentation.
I haven't actually used it yet.
And so this is gonna be my very first time
using these AI APIs.
Let's get started.
Here is how to sign up for the Translator Text API.
So we have a link in here.
We do (inaudible) Azure.
We're using the Azure Cognitive Services Documentation.
That basically refers to anything that's like text analysis.
You can do sentiment analysis.
You can do all sorts of things in Azure.
And I'm kinda of excited to try all of these.
There's cognitive services with language support,
data model requirements.
You can do like computer vision.
There's even a Face API,
if you want to do like facial recognition.
There's Ink Recognizers,
that you can recognize hand writings.
Form Recognizer, Custom Vision Service.
Video Indexer, so you can index videos.
Speech services, these are what we are gonna be using today.
Translator.
There's language APIs.
Q and A Maker, question and answer maker.
Whoa, I wanna try that.
Guys, we can make a Q and A maker.
That's really cool.
Does it automatically answer or is like an FAQ?
I don't know.
You could ask the Azure Team,
or you could even try it out.
It's a cloud-based API that creates
a conversational question and answer layer over your data.
It answers your users' natural language questions
by matching it with the best possible answer.
Whoa.
And you can build a bot in minutes.
Immersive Reader.
What is Immersive Reader?
It's a tool that implements proven techniques
to improve reading comprehension for emerging readers.
Whoa.
This is the one that I'm excited about.
This is Anomaly Detector.
Could you imagine if we could detect
people in here as our anomaly?
Or Content Moderator.
These seem like perfect fits for Twitch chat and stuff.
I think these are really neat, the Decision APIs.
This is what we're gonna be using.
We're using the Azure Cognitive Services Documentation.
We're gonna try out the Language Text Translator API.
I'm gonna get ChatterboxTranslator bot,
which is our chat translator open source.
This is on our GitHub by the way.
If you guys wanna actually see the code
to most of our projects,
they're all open source on our GitHub.
So you can check it out.
You can learn from it.
You can expand it.
You can add modifications to it and submit support requests.
And then we'll put it in.
And then they'll improve it.
And that's the whole point of open source.
It's amazing.
If you guys are interested,
this is what the Microsoft Azure thing looks like.
You have to sign up for the Translator Text API.
Sign into the Azure portal.
You can create a free account.
If you create a free account, apparently you can get
$200 worth of Azure credits for entirely free for 30 days.
So you can use all of these AI APIs.
$200, that's a lot. (laughs)
You can do a lot with it.
And then you just create resource.
And search the marketplace,
so you can be like Translator Text.
And so that's what I did.
I was like, Create a resource.
And then I said translate.
And then you have Translator Text.
And then you just create.
And then it'll create it for you.
And I actually have that up and running.
This is what we're gonna do.
We're gonna creative a new version of this function.
We're gonna say translate message with Azure.
Then we go here and we're like, subscription key.
We go process.env.Azure_KEY.
Up here we'll say translate message with Azure.
Had to type in exclamation point join.
Okay, so now if we do Google queso, then, here we go.
Check it out!
So it detected the language
as language Español, score 1.
That's pretty good.
It knows that it's Spanish already.
So it's got translations.
Here's a detect language.
It's got the first one.
It's detected and the text is owl cheese.
All right, that's so easy.
Holy crap, so all I have to do is (mumbles)
and then zero.text.
Is that right?
Wow, oh dang, all right so now we do that
and then connected, starts up.
Google queso.
Which means owl cheese.
Oh, check it out, Translator's working.
(Laughs) It was really, really easy.
We basically just did this,
we copy, pasted the sample code from here.
And then reformatted our code a little bit,
so that it would understand the return format
of the Azure's API.
And that was it.
And then it works.
(laughs) it works.
(laughs) Oh my gosh!
Lily, it translated your lol.
(laughs) That's so funny.
Uh-oh, (laughs) that's not good.
I think Twitch chat broke guys.
I'm so sorry if you can't chat. (laughs)
(laughs) Oh my gosh!
It's not getting the messages at all.
Oh dear, oh dear.
We're breaking it, sorry.
It's not getting my message.
Oh, it finally got it.
Okay.
I has the experience been with Azure?
It's been really nice.
So basically all we have to do so far,
for changing our translation API for our chat translator
on our Twitch chat, was to literally go to translate.js.
And then we copy, pasted the sample code from this link.
And then changed the to language in the text.
And then put it into our request here.
And then reformat the result to match our format,
that we were reading out of.
And that was it. (laughs)
We did it so fast, that I was like, "Oh, wow!" (laughs)
Now we're going to try the Speech Recognition
and the Cognitive Services stuff.
And hopefully I can get what I'm saying translated
into another language, and show that on stream.
So that's what we're working on next.
And to do that, it looks like what we have
to do was to download this SDK.
And now we're creating it.
All of this code is going to be in this repository here too
Most of our projects are all open source Donkeyed up,
and so you can always check it out there too.
All right, let's try this.
Start recognition.
Allow.
(gasp)
Oh, undefined reason.
Okay, so maybe we have to set the region like this.
Unable to contact server.
Hmm, it might be that I need a different subscription key.
So I'm going to try a different key.
So, here it is again.
Let's try it.
Testing, testing.
Does this work?
That was it, that was it!
Oh my gosh, look at this.
It's working guys.
And we can recognize all the text.
This is awesome.
I wonder if I can make it so that we don't have
to actually click the button anymore?
I can do it where it just recognizes
any time I'm saying something.
Oh, we have to use addTargetLanguage.
That's why.
So I have to do addTargetLanguage
and then we add it like that.
Testing, testing, does this work?
That's not in German, wait a minute. (laughs)
Wait a minute. (laughs)
Okay, okay, we got it.
So now, let's try this.
Command.
What should I say?
Web-Craft, you're so awesome for following the channel.
Here, let me give you some fluff points.
And I don't know if it translated it right.
Let's see if we can translate it back.
Wow!
This is amazing, it translates it back and back again.
And holy moly.
Hey Sherman, tell us a joke.
>> When you have a bladder infection, you're in trouble.
>> (laughs) You're in trouble. (laughs)
It took me so long. (laughs)
Oh my goodness.
It's doing it.
Okay, what if we translate it from Spanish to English?
Hola, señor.
¿Cómo estás?
Is this amazing or what?
Hola, buenos dias, buenas tardes, bienvenido.
¿Dónde está el baño?
We could do French.
C'est la vie.
La Vie en Rose.
Life in pink.
This is amazing.
Friday, Friday, got to get down on Friday.
I'm gonna change it to French.
Say something in English,
now it's gonna translate it into French.
We're past our time, oh my gosh.
That's okay, we did a lot today.
Look at this, I can speak in German and have it translate.
Well, I'm talking in English
and then it gets translated in real-time to German.
I'm gonna try French again.
And then, we will wrap up stream there.
But what did you guys think?
Do you guys like Azure so far?
I like it a lot.
I think we might use more of these APIs.
Oh there's a link, you can click that link and check it out.
Let's do one final vote.
You can type in yes, if you would like to try Azure.
Type in no, if it's not for you.
Let's see.
Holy moly, (laughs) 12 people.
This is unanimous, everyone wants to try it.
I'm so glad.
Oh my gosh.
All right, let's see who else, who else.