question

Hrishikesh Jadhav avatar image
Hrishikesh Jadhav asked ·

My AudioPlayer Alexa Skill doesn't load the mp3 from given URL quickly.

I've created a custom podcast skill for my podcast. But it doesn't load the audio file quickly. It takes time and sometimes doesn't play at all. Initially I thought that it was the WiFi problem. But when I play podcasts like The Dave Ramsey Show etc, they load and start instantly.

My hosting site is libsyn.
Audio URL in form : "https://traffic.libsyn.com/secure/ABC-episodeXX.mp3

The skill is not live yet. But does anybody know why this is happening?

alexa skills kitaudioaudioplayer
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Anand@Amazon avatar image
Anand@Amazon answered ·

Hello Hrishikesh,

Please share skill id for further investigation.

10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Joseph Kesselman avatar image
Joseph Kesselman answered ·

When my code first opens a URI for mp3 playback, there's usually a delay of about 5 seconds. After that, there may be some caching going on, since subsequent playing of the same mp3 seems faster. So it's possible that as your skill gets used more, the average delay may decrease.

My kluge for now is to reply to requests to play an episode with a "Retrieving episode..." message so the user knows that there may be a wait.

At one point, setting a start offset seemed to introduce further delay, and I was adding "This may take up to (estimate) seconds, please stand by" to that message based on multiplying the offset by a scaling factor... but that doesn't seem to be a problem for me right now.

Note that the APIs have the ability to queue up the next mp3 while the current one is still playing. Taking advantage of that may hide the preload/buffering delay.

(I'm still just experimenting and guessing my way through this architecture -- and I'm working through Jovo rather than directly/only with the AskAPIs, so my experience may be atypical.)

10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.