rhasspy / wyoming-satellite

Remote voice satellite using Wyoming protocol
MIT License
714 stars 105 forks source link

[REQUEST] “Matter Casting” for music streaming (e.i. also work as a Matter Cast audio receiver)? #48

Open Hedda opened 10 months ago

Hedda commented 10 months ago

Please consider also looking into adding “Matter Casting” support to the Wyoming Satellite project, to enable multi-purpose usage on all Satellite devices (like any upcoming "Home Assistant Satellite" smart speakers and smart displays/screens) so that Wyoming protocol for remote voice satellites in the future also be used be used as "Matter Cast" receivers (Matter Casting players) for receiving and playing audio and video streams being cast from “Matter Cast" compatible applications.

See current "Matter Casting APIs" (which currently only have example for video player but the concept should be similar):

The reason why I think support is interesting for the Wyoming Satellite project is that it seems to be the most serious attempt at creating an open standard for local video and audio casting that is meant for broader adoption across different ecosystems for interoperability, and with this being a direct alternative to the competing closed-source Google Chromecast and Apple AirPlay protocols we all know that good use cases exist for an open audio and video stream protocol that is design for local wireless casting.

Personally, I would love to be able to use high-quality "Home Assistant Satellites" as multi-room audio speakers for music playback, (as preferably I like to upgrade or replace my existing Google Nest / Google Home smart speakers and Chromecast Audio enabled devices with newer/other hardware with Hi-Fi quality sound for both multiroom music playback and local voice assistant control).

E.g. once there is some "Home Assistant Satellite" hardware available to buy or build, a few real-world use-case examples for them are related to them being used as a point-to-point and multiroom sound system for music playback, with music streaming from either DIY media player sources, like Home Assistant's Radio Browser, Plexamp and Kodi, or probably more interestingly; streaming music from different commercial music services apps like Amazon Music, Spotify, Tidal, Qobuz, YouTube Music, Apple Music, if and when they add support for this new “Matter Casting” streaming protocol to their apps.

Anyway, “Matter Casting” is a new open protocol and technology (part of the later Matter standard) that will specifically enable users to cast video and/or audio content from their smartphone, tablet, and computer to their smart TV or smart display. From an end-user’s point-of-view this new “Matter Casting" protocol is meant to work the same thing as the competing Google Cast and Apple AirPlay protocols with a few major differences: implementing support for this “Matter Casting” is royalty-free and it is based on open-source code, designed from the ground up to be a “free and open source” video and audio casting/streaming standard for the best possible cross-platform compatibility.

“Matter Casting” was a small missing part needed in the larger Matter suite toolkit to allow for a unified way to stream audio and video locally. I understand that with the Matter standard already having hundreds of member companies, not every CSA member company has publicly committed to every part of that specification standards, with as most have only announced support for the IoT parts that control smart devices.

It is under early development and still looks to be missing real-time audio synchronization to allow for synchronized multi-room music playback, (which I believe is a feature that many if not most users would want from "Home Assistant Satellite" products), but at least the framework already has support for Android, Darwin (for iOS and Mac), and Linux, allowing developers to implement it into various types of products on many platforms. That will hopefully ensure wider-spread compatibility between devices of different manufacturers and ecosystems.

Matter Casting adoption has so far been announced by Amazon who will first add support to newer Amazon Fire TV and Amazon Echo Show series of smart display devices via an upcoming firmware update, (in which it sounds like they might initially only implement video streaming?).

More interestingly, Amazon has stated that they do not plan on ever adding support for Google Cast or Apple AirPlay video casting to their new devices. This news is just hot from the press from the floor of CES 2024 (the largest yearly Consumer Electronics Show tech event):

https://www.aboutamazon.com/news/devices/amazon-ces-2024-announcements

Amazon is a long-time supporter of using open technology standards to give customers more choice over the devices and services they use in their homes. That’s also why Amazon is a founding member and key contributor to the Matter Standard. At CES, Amazon announced Matter Casting, which enables customers to cast content to Fire TV and Echo Show 15 devices directly from supported streaming apps on iOS and Android. Customers can begin watching a movie or browse for their next favorite show from Prime Video on their phone, and cast it to their compatible Fire TV device or Echo Show 15. This is an industry-first demonstration of implementing Matter Casting.

@synesthesiam thought and hoping that this would be espeically be interested to you, as being an employee of Nabu Casa which is now member of the CSA (Connectivity Standards Alliance, with the possibility of influensing the developors that develop the suite of specifications and code for the Matter standard, you and others at Nabu Casa have the chance to get a seat at the table to have feedback and input to affect to direction that development of this new protocol is going? At least I believe this new "Matter Casting" is very relative now, with other Home Assistant developers from Nabu Casa working hard on IoT side of Matter -> https://www.home-assistant.io/blog/2024/01/05/matter-livestream/

PS: Currently, the readme for the tv-casting-app example makes it clear the "Matter Casting Video Player device type" is supported, but there I could not find any information about if a "Matter Casting Audio Player device type" is also supported, if not then could be a good idea for someone like Nabu Casa to convince the Matter Group that it is needed too, for pure audio playback (i.e. cast music to a smart speaker). Until then I believe you might need to make use of "Video Player endpoint" (either Casting Video Player or Basic Video Player) defined in the Video Player Architecture:

Reference: https://leconiot.com/matter/1.1/device_library.html#ref_VideoPlayerArchitecture (copy of older Matter spec version.)

Hedda commented 10 months ago

Off-topic; it would also be awesome if “Matter Casting” support was added to Home Assistant Cast in the future so that it can cast Home Assistant data via video to a Matter Cast enabled smart display/screen. Post a feature request for that in Home Assistant community forum as the "Matter Casting Client” part not directly to the Matter Casting reciever parts:

https://community.home-assistant.io/t/matter-casting-support-in-home-assistant-cast-new-upcoming-open-protocol-standard-for-local-video-and-audio-streaming/671645

Hedda commented 10 months ago

FYI, I posted a feature request for audio-only casting to the Matter (project-chip) repo -> https://github.com/project-chip/connectedhomeip/issues/31389

@synesthesiam Got a reply there from chrisdecenzo (Principal Software Development Engineer at Amazon Lab126 who has led the development of the Matter Casting standard for video casting) that they would need someone else to volunteer to lead that effort. Perhaps someone at Nabu Casa would be interested in leading the development of "Audio Player Architecture" for Matter?

PS: Btw, keep in mind that Home Assistant already feature several directly/indirectly related audio casting integrations/add-ons:

Hedda commented 5 months ago

FYI, chrisdecenzo wrote that there is now an official effort within the Matter working group right now to define use cases for audio players / smart speakers but only Matter/CSA members can participate, see comment -> https://github.com/project-chip/connectedhomeip/issues/31389

Hedda commented 3 months ago

FYI, looks like they updated the documentation for the Matter Casting APIs as part of tv-casting-app to match v1.3 Matter APIs:

https://github.com/project-chip/connectedhomeip/blob/master/examples/tv-casting-app/APIs.md

They also updated their tv-app (Matter TV Casting app example):

https://github.com/project-chip/connectedhomeip/tree/master/examples/tv-app

However these again so far only cover video casting and not audio-only for pure music playback.