in today's video i'm going to be showing you how to make use
of the amazon echo skills kit sound library in home assistant check it out
what's going on guys i hope you're all doing well before we get started i should probably
just quickly explain what the echo skill kit sound library is just in case you didn't know and if you
hear me saying the word echo a lot throughout this video it's just to save me saying the
other word which may be a trigger and set off a lot of your guys amazon echoes so the skills
sound library is a collection of different sounds that you can use within your amazon skills
now for our purposes we're going to be using these sounds within our home assistant automations and
there's a whole bunch of different ones that you can make use of i'll have this page linked in the
description below but on this page you can just browse through the various different sound effects
you can also search for them one of the handy things that you can do is actually play the sound
in the browser so if you find a particular sound that you want you can just select it
and then you can just click play if you're a subscriber of the channel then you will have
seen in the past i've done various different videos using the amazon echo and home assistant
we've done things like the text-to-speech we've done actionable notifications we've also had a
look at custom mp3s now if you are interested in any of those and you haven't seen them you'll find
links to them all in the description below the purposes of all of these videos have been to get
the echoes to give you a set spoken response or to play a specific sound or sound effect based on
something that happens within home assistant and the responses and feedback can literally
be anything in my examples we had shrek whisper into us we had glados saying spoken phrases to us
and i also showed you how to create a little box that you could add to your dashboard
and whatever you type in that box the echo will just say out loud don't forget to subscribe and
that all sounds pretty cool right to actually get started and begin making use of some of these
features that i just spoke about you're gonna need to have the echo media player custom component set
up and installed now if you're not sure how to do that in that very first video with the text
to speech i actually cover the full setup and installation of this so go and check that out and
then come back here and if you've already got that set up and installed then you'd be good to just
carry on with this video if you followed along with my tutorials or you read through the very
well documented custom component documentation then you'll know that there's a section that
allowed you to play sounds by making use of the media player dot play media service and as you
can see here in the examples in the documentation you can do things like service calls and script
calls to actually select an individual echo and select the actual sound effect you want and when
you do this and make the call it will just play that sound effect on the echo and it just works
really well and if you don't like making use of yaml it can actually all be set up through the ui
so again you can just select the target type your content id and just select that content type the
quality of the amazon sound effects are really good and the actual delay between clicking the
call service or the automation triggering is very minimal so you can now make use of those service
calls and script calls and you can apply those different sound effects wherever you want there's
a handy little known available sound section in that documentation and if you just expand that
you can just view a list of all the known working sounds and you basically just choose one of those
and you use that id and then you place that in your service call or script as an example and one
that's relevant to halloween there's a halloween sound effect there so if you wanted to make use of
that we just need to copy that id so the example here is called horror turn so we just simply
copy that and then back to wherever we're making that service call we just need to swap the id out
so for here i've just got the simple service call from the example and i'm just going to
replace that for that horror sound id and we just put horo10 there and then now when we click call
service we'll actually get that halloween sound effect and that's nice and straightforward and
very simple to do but one thing you'll notice is that this list of known sounds is very small
so for example if you wanted more halloween sounds then you've pretty much only got that one
to choose from in the documentation you'll notice that it says that additional potential sounds can
be found here and if we click that that's going to take us to that amazon page that i showed you
right at the beginning where you could pick the different sounds and test them out on this page
we could just scroll through the list of available sounds until we find one that we want or we could
do a search for a particular type of sound effect we want so we're sticking to that halloween theme
we could search for halloween based ones or if we wanted to we could just stick to that whole
horror theme so if we did a search for horror that will bring up all the different horror sound
effects now the one that we previously used was horitan and that does appear in this list now if
that appears in the list why couldn't we just use horror 11 or horror 12. chances are you probably
tried this out yourself so you tried changing the id from 10 to 11 or 11 to 12 and then hitting
that cool service button and you will have just noticed that you've got no sound effect whatsoever
in order to actually get this to work and to be able to choose one of those sounds from the list
and actually get it to play we're going to need to swap out the service so we're actually going
to change from that mediaplayer.play media service and we're actually going to use one of the notify
services now if you did the text-to-speech video and followed along with that it'll actually be
the same service that you used for that any of the code that i make use of in this video will be down
in the description below so feel free to look at that for reference but you will need to update the
parts to match your own configuration so to get started with this we're just going to start with
a blank service and we're going to want to choose the notify service so if you select service there
and start typing notify you should see that list start to populate with all of the different notify
services that you have now if you have a lot of echoes you should see them all here so i'm just
going to choose one of my echoes from the list here and i'm going to go for this downstairs echo
so i can see this notification send a notification via the echo media downstairs echo so i'm going to
select that one and in the description there you can see that it's going to send a notification
message to that downstairs echo we then need to provide a message for the notification so anything
you type in this line will be what the echo says but rather than actually typing something
in we're going to want to use a sound effect so if we head back over to the sound library we can
then choose one of these sounds and again you can just open them up and actually play them let's say
for example we want this horror 8 we could select that and then we could play it to make sure it's
one that we want and you'll see this little source code option here so you can click this handy copy
to clipboard button and then jump back over to your home assistant back in home assistant on that
message line we're just going to paste in that url that we just copied final bit of information
that we need to provide is just the data so if you just tick that little box next to data
and then on the line for data you're going to type type and then colon and then tts
if you then go ahead and click that call service button you'll hopefully hear whichever sound
effect you chose to use and essentially all this is doing is it's just making use of a text
to speech notification but rather than actually providing it with some text to say we're giving it
the audio source url and then that just looks up in the sound library the sound effect to use and
then it plays it and you can use that method to make use of any of these different sound effects
and again sticking with that halloween theme if we wanted to use a different halloween theme we could
do a search for something like ghost and we could find a ghost sound effect so let's just randomly
choose one of these so we'll go for spooky sound 4 and then again we just copy that to the clipboard
and then back over in home assistant we just update that message body and then just simply
press call service and we'll have that new spooky sound and that's literally it following along with
this method is going to allow you to make use of any of those sound effects within home assistant
and if you wanted to take what we've just learned and turned it into an automation then you can do
that if you just start up a new automation and then just set a trigger so in my example here i'm
making use of a door contact sensor so when this door sensor opens i'm just going to add an action
if you still happen to have the developer tools open you can just copy the code straight from that
by just heading into yaml mode and selecting it all if you then head back into your automation and
again swap that to yammer mode you can just paste that in and then revert it back to the ui editor
so with this example when that door sensor opened it would have played a spooky sound and that would
have been perfect for halloween but maybe you can make use of this next halloween or with something
else around your house or even an upcoming holiday like christmas but probably not using spooky
sounds and that's just about it for today's video if you have enjoyed it and found it useful then
don't forget to drop me a like and if you're not already hit that subscribe button and ding dong
the notification bell you'll then be alerted to any future video that i do and as always
a massive thank you to these awesome dudes these awesome dudes on my patreons if you're interested
in helping support my channel and becoming one of these awesome dudes there'll be a link to my
patreon in the description below but thank you for watching and i'll catch you in the next one cheers
you