I think the only option is to starve the player with pseudo-real-time stream. I did an Alexa version of my bridges and I discussed that with Paul. It works as well, but for me, the real showstopper is that you can’t really control it from LMS. We did not find a way for commands (play/pause/stop) to be relayed to a skill. So I can easily do the audio data ´starving’ but I don’t feel it will be a great solution anyway. In addition, in the tests I’ve done you can sent pcm to Alexa (in a wav or in an audio/L16 format) so the pseudo real-time will not be accurate. My bridge can decompress any stream on the fly to à given format amongst plain pcm, flac or mp3 so the only viable option would be mp3 at CBR and use that for throughput estimation ... not great anyway
Using Amazon Alexa device as LMS player
Collapse
X
-
LMS 8.2 on Odroid-C4 - SqueezeAMP!, 5xRadio, 5xBoom, 2xDuet, 1xTouch, 1xSB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000, ShairPortW, 2xChromecast Audio, Chromecast v1 and v2, Squeezelite on Pi, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5, RivaArena 1 & 3 -
I think the only option is to starve the player with pseudo-real-time stream. I did an Alexa version of my bridges and I discussed that with Paul. It works as well, but for me, the real showstopper is that you can’t really control it from LMS. We did not find a way for commands (play/pause/stop) to be relayed to a skill. So I can easily do the audio data ´starving’ but I don’t feel it will be a great solution anyway. In addition, in the tests I’ve done you can sent pcm to Alexa (in a wav or in an audio/L16 format) so the pseudo real-time will not be accurate. My bridge can decompress any stream on the fly to à given format amongst plain pcm, flac or mp3 so the only viable option would be mp3 at CBR and use that for throughput estimation ... not great anyway
The plex alexa skill managed to stream audio from a local streaming server, and that my media alexa - service also achieved to get an echo device to be a functional media player. I wonder how they did that. Do they just play a serverip/stream.mp3 and just restart that, whenever they get a control?
I would have a look at these skills, but I'm out of ideas, how to pull them from the app store or extract them any other way...Comment
-
I tried to feed a rtmp:// stream to alexa, but that doesn't work, even though exoplayer should support that. Maybe a skill using webrtc could stream the low latency stream to the alexa, but all in all, I concur, that it won't be a great solution.
The plex alexa skill managed to stream audio from a local streaming server, and that my media alexa - service also achieved to get an echo device to be a functional media player. I wonder how they did that. Do they just play a serverip/stream.mp3 and just restart that, whenever they get a control?
I would have a look at these skills, but I'm out of ideas, how to pull them from the app store or extract them any other way...LMS 8.2 on Odroid-C4 - SqueezeAMP!, 5xRadio, 5xBoom, 2xDuet, 1xTouch, 1xSB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000, ShairPortW, 2xChromecast Audio, Chromecast v1 and v2, Squeezelite on Pi, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5, RivaArena 1 & 3Comment
-
I see that Alexa devices should also support HLS.
This document lists codecs, containers, streaming formats, and playlists, that your product should support to provide a familiar Alexa experience to your customers. Living Docu...
and that WAV/PCM is supposed to be supported but the document does not specify how it can be delivered.Paul Webster
Author of "Now Playing" plugins covering Radio France (FIP etc), PlanetRadio (Bauer - Kiss, Absolute, Scala, JazzFM etc), KCRW, ABC Australia and CBC/Radio-Canada
and, via the extra "Radio Now Playing" plugin lots more - see https://forums.slimdevices.com/showt...Playing-pluginComment
-
The plex alexa skill managed to stream audio from a local streaming server, and that my media alexa - service also achieved to get an echo device to be a functional media player. I wonder how they did that. Do they just play a serverip/stream.mp3 and just restart that, whenever they get a control?
Having the media server (e.g.) stop/next/pause once the stream is already playing does work ... but for it to be actioned in a short time after the request is issued requires the Alexa device to have a small amount in its local buffer otherwise it can take tens of seconds for the action to take effect.
One way to achieve that is to starve the device by sending it just enough data to have 1-2 seconds in the buffer.
If the published Skills manage to do that in a different way then it would be interesting to find out.Paul Webster
Author of "Now Playing" plugins covering Radio France (FIP etc), PlanetRadio (Bauer - Kiss, Absolute, Scala, JazzFM etc), KCRW, ABC Australia and CBC/Radio-Canada
and, via the extra "Radio Now Playing" plugin lots more - see https://forums.slimdevices.com/showt...Playing-pluginComment
-
Another way to have the Alexa device play the tracks would be harder to do but might provide a better user experience - especially for those with display-enabled Alexa devices (such as Echo Dot).
Rather than telling the device to play a continuous stream, it could be told to play one song at a time. Then each song can have its own metadata (including cover art) sent to the device as a playlist item.
There is a callback from Alexa when the currently playing song is "nearly finished" (not defined when that is) so that the next item can be added to the device playlist.
As far as I can see ... it still does not allow the skill to proactively tell the device what to do.
Would need LMS plugin to tell the Skill (via an alternative route) the details of the next song including (part of) a URL that the Alexa device will have to access to get the contents of the song. NOTE: I think there is a good chance that this URL would have to be HTTPS with a certificate that can be verified.
In this case I think the flow would be ...
User asks device to start playing (something)
Amazon calls Skill
Skill gives Alexa device an initial URL to play (via response to Amazon which then passes it to Alexa device)
Parallel events:
- As song comes towards the end (undefined when that is) ... Amazon calls Skill to say Playback nearly finished
- LMS plugin calls Skill via different route to give details of next item in playlist (ideally before "Playback nearly finished" event above)
Skill adds next item to the device playlist
Clearly more work - and if the only benefit is that Alexa devices with a display can see what song is playing then it is of limited use (my guess is that not many devices with screens are installed compared to those without screens).
If this technique resulted in the web-based alexa.amazon.com showing the media controls ... then it would have the benefit of being able to have LMS tell the device to change volume or skip to next track (through some highly dubious and unsupported emulation of Alexa browser interface).Paul Webster
Author of "Now Playing" plugins covering Radio France (FIP etc), PlanetRadio (Bauer - Kiss, Absolute, Scala, JazzFM etc), KCRW, ABC Australia and CBC/Radio-Canada
and, via the extra "Radio Now Playing" plugin lots more - see https://forums.slimdevices.com/showt...Playing-pluginComment
-
I have had confirmation from Amazon that the media controls are not available via web interface (and hence, unofficial API) for Skills in general but only for specific ones like Spotify.
They suggested I ask for an enhancement.
So I have.
You could add your support at
Paul Webster
Author of "Now Playing" plugins covering Radio France (FIP etc), PlanetRadio (Bauer - Kiss, Absolute, Scala, JazzFM etc), KCRW, ABC Australia and CBC/Radio-Canada
and, via the extra "Radio Now Playing" plugin lots more - see https://forums.slimdevices.com/showt...Playing-plugin👍 1Comment
-
You could add your support at
https://alexa.uservoice.com/forums/9...-amazon-device"I have come to chew bubblegum and kick ass. And I am all out of bubblegum" - "Rowdy" Roddy Piper as John Nada in "They Live"
Squeezebox v.1(x2)(retired),Squeezebox v.2, Squeezebox Boom, Squeezebox Controller, Squeezebox v.3, I use OrangeSqueeze for Android on Samsung Galaxy S8Comment
-
Rather than telling the device to play a continuous stream, it could be told to play one song at a time. Then each song can have its own metadata (including cover art) sent to the device as a playlist item.
There is a callback from Alexa when the currently playing song is "nearly finished" (not defined when that is) so that the next item can be added to the device playlist.
As far as I can see ... it still does not allow the skill to proactively tell the device what to do.
Would need LMS plugin to tell the Skill (via an alternative route) the details of the next song including (part of) a URL that the Alexa device will have to access to get the contents of the song. NOTE: I think there is a good chance that this URL would have to be HTTPS with a certificate that can be verified.
I wonder if Spicefly Sugarcube with it's MusicIP auto queue would work in this case. (S-SC is the one LMS plugin that I could not live without.)Comment
-
I guess it depends on the skill
Hello all,
I was thinking along the same line and the only satisfactory solution I could come up with, was to develop a skill, that controls the Echo device playing the music from the LMS. Unfortunately as stated above, Apps like iPeng won't work, but I was thinking along a good skill to do the trick.
This skill is now ready for testing. You can find more information on how to set it up and on the voice commands at
or in German at
If you want to test it, register at
You will get a 4 week premium package immediately. If you send me an email to
[email protected]
and let me know, that you want to test the service, I will setup your account with 6 month premium and will add you to the list of testers, so you get access to the Alexa skill. Please send me feedback or a short info about your experiences also to
[email protected]
Have fun
IngoComment
-
Hello all,
I was thinking along the same line and the only satisfactory solution I could come up with, was to develop a skill, that controls the Echo device playing the music from the LMS. Unfortunately as stated above, Apps like iPeng won't work, but I was thinking along a good skill to do the trick.
This skill is now ready for testing. You can find more information on how to set it up and on the voice commands at
or in German at
If you want to test it, register at
You will get a 4 week premium package immediately. If you send me an email to
[email protected]
and let me know, that you want to test the service, I will setup your account with 6 month premium and will add you to the list of testers, so you get access to the Alexa skill. Please send me feedback or a short info about your experiences also to
[email protected]
Have fun
Ingo------------------------------------------------------------------------------------Comment
-
Thank you for the answer,
I have one question - it requires opening one port and that only for triggering the plugin on the music server to fetch a new command from the Roomskills server using a secure protocol.
Mmh, I would be interested to understand where you see the problem?
Regards
IngoComment
-
Thank you for the answer,
I have one question - it requires opening one port and that only for triggering the plugin on the music server to fetch a new command from the Roomskills server using a secure protocol.
Mmh, I would be interested to understand where you see the problem?
Regards
Ingo------------------------------------------------------------------------------------Comment
Comment