Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Play audio file from server

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?

like image 979
Arshad Avatar asked Apr 05 '17 13:04

Arshad


People also ask

How can I play audio from a website?

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.

How do I play an audio file on Windows?

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.

How audio files can be play through 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.

Can Chrome play audio files?

You can play music files and videos on your Chromebook or through the web.


1 Answers

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

like image 137
Nazeem Avatar answered Oct 09 '22 04:10

Nazeem