I followed the steps to create a sample app and it is doing perfect conversation with my custom agent created.
Can we play our own music or MP3 hosted in my server by a voice message to Google Home? Or I need to play an audio from my Android app that is installed in Android device which is paired with Google Home by sending voice message to it?
To play sound file in the background on a web page, use the <embed>… </embed> element. Also, use the autoplay attribute. This will run music in the background whenever the page loads.
In Windows 10, open the Start menu, and scroll down to the "W" section to find Windows Media Player. Once it is running, select Open from the file menu, then browse to the location of the audio file. Alternatively, you can drag-and-drop the audio file onto Windows Media Player.
Prepare media file: To play a media file, you need to first prepare it i.e. you need to load the file for playback. Methods used for doing this are prepare(), prepareAsync(), and setDataSource(). Start/Pause the playback: After loading the media file, you can start playing the media file by using the start() method.
You can play music files and videos on your Chromebook or through the web.
You can play audio files using the
<speak>This is the audio <audio>link/or/url/to/audiofile.mp3</audio></speak>
in your string response.
You can find more details in the SSML section
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With