a-marcel / hassio-addon-owntone

9 stars 13 forks source link

Stream local audio #7

Open spycle opened 1 year ago

spycle commented 1 year ago

Hey, is there a way to stream the locally playing audio?

Use case - I have the Spotify Connect addon installed, and this addon installed, and would be great to be able to stream the output to airplay (I know OwnTone has Spotify but it's not Connect)

iVolt1 commented 1 year ago

If there was a way connect the Spotify Connect addon to the OwnTone addon through name pipes the same way that librespot-java pipe Spotify music and metadata to Owntone over a named pipe, that would be great. The version of OwnTone this addon on has using has the capabilities to listen for music and metadata over a pipe so I think all this addon would need to do is have a config or default for what directory to listen on.

So possibly all that needs to be done is to modify the Spotify Connect addon to write to a named pipe. The mkfifo command to create the named pipe can be run in the haos terminal.

There is discussion here of the /share/owntone with a music folder in it. Maybe this OwnTone addon already knows to listen to fifos in the /share/owntone folder?

a-marcel commented 1 year ago

I don't fully understand. I've this AddOn running and have configured the official OwnTone Integration. This gives me the possibility to send any sound file or stream to the OwnTone AddOne. I use this ass example with Google Text To Speach and send the result to my HomePods.

spycle commented 1 year ago

Thanks for the reply. It's been a while since I wrote this but what I was trying to do at the time was to make the HomePod a Spotify Connect device. I've actually achieved this now with the 'HiFy: AirPlay+DLNA for Spotify' android app using a spare phone I had lying around. Works great.

If I could do this without the phone i.e. having it all running on my HA Pi, that would be the ultimate solution. The Spotify addon makes the pi a Spotify Connect device so I can stream music to it to play locally, your addon enables me to stream from the pi to the HomePod, I just can't link the two together