How to start an Audio from a certain time

google-assistant

#1

Like the title, I would like to know if there is a way, like with Alexa (get/set offset), for playing audio at a certain time for Google Asssistant.


#2

Do you use the new Conversational Actions?

Not 100% sure, but I think it wasn’t possible with the old Google Assistant integration.

Here’s a Conversational Actions example:

this.$googleAction.$audioPlayer.playAudio({
			name: 'Media name',
			description: 'Media description',
			url: 'https://storage.googleapis.com/automotive-media/Jazz_In_Paris.mp3',
			image: {
				large: {
					alt: 'Jazz in Paris album art',
					height: 0,
					url: 'https://storage.googleapis.com/automotive-media/album_art.jpg',
					width: 0,
				},
			},
		}, 
                 '2500ms');

#3

I had no idea of the new integrations, I have tried this one in a Github project that I have found jovotech github but I have no idea why but in the jovo run it doesn’t play the audio. Audio works on Jovo run for google assistant for conversational actions?


#4

I have tried and it doesn’t work, with the offset, without yes


#5

My, bad ms doesn’t work. You have to use s

This is what I found in the Google Assistant docs:

Seek position to start the first media track. Provide the value in seconds, with fractional seconds expressed at no more than nine decimal places, and end in the suffix “s”. For example, 3 seconds and 1 nanosecond is expressed as “3.000000001s”.


#6

Thank you, now it works but how can I do the same for an audio file that is more than 2 minutes?


#7

I tried 121s with a 4 minute file and it worked.


#8

It wasn’t an mp3 or it was? I have tried with mp3 and aac, in the second case worked, in the first one no


#9

Yes, it was a mp3 file.