TLDR: When using Google Cast/Chromecast, Spotify transcodes from their native 320kb/s Ogg format to 256kb/s AAC. This will be a huge problem when Sonos enables Google Assistant on the One/Beam. We need to make some noise with Spotify about this!
The story so far...
I've started getting into smart home technology recently and have fallen pretty hard for Google Assistant. I have two Home Minis and a Home Hub in my house. I decided to pick up a Sonos One due to the superior sound quality over the Google Home Max and also for the upcoming Google Assistant support.
Having previously been heavily in the Apple ecosystem, I've been exclusively using Apple Music but have just signed up to a Spotify trial due to better integration with smart devices. I have a Sony STR-DN1080 receiver in my lounge room which supports AirPlay 2, Chrome Cast, and Spotify Connect. It's hooked up to a full set of DALI Zensor speakers, so it's a very respectable listening experience in there.
On the weekend, I was trying out Spotify's functionality on my receiver and was able to tell my Google Home to cast Spotify directly to it, but it sounded terrible. I opened up the Spotify app and changed from using Google Cast to using Spotify Connect for the same song, and the quality was much, much better.
On doing some digging, I found out that it's because (for some unknown reason) Spotify transcodes the music to AAC 256kb/s when using Google Cast, but keeps it in native Ogg 320kb/s when using Spotify Connect. I've confirmed all this with a Spotify customer service agent. This baffles me as to why they'd do this, because the Google Cast specifications support Ogg natively using the WEBM container.
From what I understand, the main reason it sounds so bad is because of the transcoding process. Going from a compressed format at 320kb/s to another compressed format at 256kb/s in real-time without having a lossless master to transcode from means you're losing orders of magnitude more fidelity data. I urge anyone with a similar setup (or anyone in the Google Assistant for Sonos beta) to try and hear the difference for yourself.
Now how does this relate to this community? Well there's many posts about people complaining about Spotify audio quality when using a Chromecast Audio and this would be the culprit. Where it will become even more evident, is when Google Assistant support gets deployed to the Sonos One/Beam.
How can you help? Head over to this idea (https://community.spotify.com/t5/Live-Ideas/Chromecast-Stream-highest-possible-Quality-to-Chromecast/idc-p/4687982) on the Spotify community ideas portal, vote for it, and make some noise about it to get more and more visibility on it. Hopefully they'll fix this rather major oversight before Sonos deploys their Google Assistant support.