0:01
Hello! So, we're going to continue going over
some AWS projects and our next one is going to be focused on Polly.
So, let's go onto the overview slide to see what we're doing.
So first, we're going to describe the service that is Polly and then we're
going to show how to use Polly through Python, using two examples.
The first one would be using Polly with different phrases,
and then the second one would be using Polly with two distinct speakers.
Let's just go to my computer.
So here we have Amazon Polly and basically it
just turns text into life-like speech using deep learning.
So, I might be a little bit better than some of
the synthesizers you guys have used before,
maybe some low or very robotic.
I remember in the past using one that's just not
life-like or human at all but it just gets the job done.
The benefit of this one is, you can use it as a service.
You just give Amazon some text and then it will just
hand back an MP3 file with audio said.
And you can do it in different languages,
English, Danish, Spanish, Japanese.
And even different voices, female,
male, or just different people that they've had.
If you want to use Amazon Polly just for a record test,
you can go to the console and go here,
and then just run one of these.
Hi, my name is Joanna.
Yeah. So, you can just choose different people to test it out and different languages.
Even let's say, Japanese,
like they had. Whatever that says.
Konnichiwa. Mizuki desu.
Yeah, stuff like that.
Using this way to synthesize is useful.
But say, you're in a project because we can't really like go into this.
But they do have a API for it,
so we can use their STK and access it that way.
So, you see here we can vim into we have this program called Polly,
and here's the other recognition program we used before.
Here, it's just the Python file that they gave us to use starting.
So just adding some parts.
Like we edited this part to say different things like, "Hello, everyone."
And you can choose which voice person you want.
We'll change them in a bit.
But for now we just run it.
So here, we request from Amazon the MP3 file,
and then here, we save it in our temporary directory.
And last part is just executing or running that sound file
through the system's default MP3 player.
So, just go there and just run this.
Hello, everyone.
How has your day been?
No, it's a bit robotic-ish, but not bad.
So, if you want change it with people, as before,
you just go over here and change Salli,
and like one who's Brian.
If not, it would just give me an error.
Just tell me which option's there.
Hello, everyone.
How has your day been?
Yeah. I think, British accent?
Yeah, I think it's a British accent.
Yeah, you can do the different accents
because they'll sound more better or if you like that accent.
It's really easy just to change what it is. Let's see, how has your day been.
Let me just make it say like,
I like apple or something.
Or stop, intruder, and drop your stuff.
I see you.
Yeah, let's say for
like the home surveillance project you might want to add this on or something.
Stop, intruder, and drop your stuff. I see you.
Yeah. It will just be a little creepy for
the intruder and some sudden voice talking to them.
Or, you can make a welcoming for someone at your door,
instead of a doorbell.
I don't think it will be welcoming, to be honest.
If you just have it on loud blasting speakers.
It will be very sudden and creepy, okay.
Or how to talk to your dog or something.
So, you don't really exit and save the file here.
It actually saves it in a temporary directory.
You can change that in the program itself
because the program itself is saving it like in a CD.
Yeah, there it is, speech dot MP3, that's where it saves it.
Say, if you wanted to get it and use this for another program,
you can just save it here and then,
just grab the file, open it.
So, that was Amazon Polly,
and you can use it.
Try to use it in some of your projects.
Make it more interesting and life-like.
So, yep, stay tuned for some other services.