Play Custom Sounds on Google Home Command Responses

Learn how to make Google Home say whatever you want by playing custom mp3 or wav sounds on it

  1. joaomgcd
    After this tutorial you'll be able to do the same thing as seen at the start of this video where it's playing custom Simpsons sounds:

    /!\ If you're using this on the Amazon Echo be aware that Alexa needs the audio files to be in a very specific audio format (48 kbps for example). Check here for details.

    STEP 1 - CREATE COMMAND TO PLAY SOUND


    • In AutoVoice Natural Language Commands create a new command
    • Set the command to play a sound
    • Set the response to <speak>Hello</speak>
    (i) The <speak></speak> tags are used to indicate that you're going to use a special kind of response where you can use special stuff like playing back sound files. As you can see you can also use normal text between those tags and it'll work as well.


    Here's how that sounds like so far:

    STEP 2 - ADD SOUND FILE IN RESPONSE


    (i) These are special <audio></audio> tags that can be used to play back a sound. To define the sound you want to play you set the src attribute. This must be an URL for a publicly available sound file. You must also define what phrase you'd like it to say if the sound file can't be played for some reason between the tags, which in this case I set to Placeholder


    /!\ If you need a place to host your files, you can do it on Google Cloud Storage:

    This is how it sounds now:

    STEP 3 - PLAY 2 SOUNDS WITH A PAUSE


    (i) The <break> tag is a special tag that allows the assistant to not say anything for 3 seconds.


    As you can see the assistant will now say
    • Hello
    • play first sound file
    • wait 3 seconds
    • play second sound file
    Google Home supports a lot of other tags in the response speech like saying numbers and dates in specific ways, spelling out words and more.


    Check out all of the supported tags here: https://developers.google.com/actions/reference/ssml