Quantcast
Channel: Squeezebox : Community : Forums
Viewing all articles
Browse latest Browse all 6235

Alexa can now handle FLAC streams

$
0
0
Great news!

Although it's (as yet) undocumented by Amazon, I've long suspected that the AudioPlayer interface would be upgraded to handle lossless streams. There are actually 2 versions of AudioPlayer - one for 'skill developers' and one for 'equipment makers' who integrate the Alexa Voice Service (AVS) into non-Amazon hardware like cars and fridges. The AVS version of AudioPlayer is more capable and specifically mentions: Accepted values: FLAC, VORBIS, OPUS, AAC, MP3, PCM, AC3, DTS, MHA1, EC-3, AC-3, MHA1, MHA2, MHM1, MP4.40, MP4.40.2, MP4.40.5. The skill dev version mentions a paltry AAC/MP4, MP3, PLS, M3U/M3U8, and HLS. Bitrates: 16kbps to 384 kbps. Because Amazon HD handles lossless, it was obvious that they had access to the AVS version for 'their' service but it was unavailable to me.

When I originally got MediaServer to successfully stream to Echos using Paul Webster's clever https/PLS trick, I tested if AudioPlayer would accept a FLAC file fudged to look to Alexa like a stream. This resulted in an error that boiled down to an unsupported stream/file type. So it was lossy-streaming only to Echos from LMS. That was in 2019 and 2020.

Anyway, just now I retried the fake FLAC stream as an experiment and it played no problem on every type of Echo device I have at my disposal. This means that if we can get a /stream.flac equivalent implemented in LMS, MediaServer will be able to stream lossless files from LMS to Echos without the transcoding that's needed today. While the basic Echo Dots are hardly worthy of HiFi playback, the Echo Show gen 2 (which I have) and Echo Studio are very different beasts worthy of lossless.

Under the hood, the Echo grabs the stream itself (once the skill has told it where to look), so there's no proxy/relay in between. This 'appears' to be a https stream coming from the internet, but in reality the Echo just opens a PLS file sent to it from my server. This contains an entry for http://yourlmsip:port/stream.mp3?player=Alexa so that the Echo then fetches the audio over your WiFi connection from LMS. Once the stream starts it's bulletproof as the Echo just becomes a LAN-connected audio sink, albeit one with heavy buffering.

Do any of the geniuses like @philippe_44, @bpa, @mherger know what it would take to implement a lossless /stream from LMS?

EDIT: I just tried a UHD (FLAC, 24-bit, 88.2KHz) file and it also played without error

Viewing all articles
Browse latest Browse all 6235

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>