Closed Bazmundi closed 3 years ago
Thanks for the interesting post. At present, Shairport Sync has no programmatic interface — it runs completely isolated as a daemon, so unfortunately, there isn’t a way of interacting with it to stop and start it locally. For the last few months, an effort has been underway to add a D-Bus interface. It’s not quite ready yet, though. To address your idea, it would need to be possible to disconnect and reconnect Shairport Sync from the audio output, possibly without disturbing the source. It might take a little while...
Mike,
Wow, that would make my wife think I am so clever 😉
I note that Wikipedia throws up an example thus:
D-Bus provides additional or simplifies existing functionality to the applications, including information-sharing, modularity and privilege separation. For example, information on an incoming voice-call received through Bluetooth or Skype can be propagated and interpreted by any currently-running music player, which can react by muting the volume or by pausing playback until the call is finished.[18]
So, muting at least (or the appearance of same), while Google Home (or Alexa et al) can talk over the top, would be grand. Although, that seems to be saying that you pump the audio into the music player over the D-BUS ... hmmm. Sounds like either a lot of fun to be had working that out or there’ll be some sobbing in the foetal position. Unless there is some trick with ALSA routing?
Madam won’t be able to ask for “Next Song” etc. But she hasn’t stopped complaining about the flashing light on the C.H.I.P. (s) I have shairport-sync running on LOL. So, I need something new for her to complain about. Myself, I use the flashing LED as a night light when bumbling to the toilet late at night. I am sure it has stopped a toe stubbing or three. There might be some means to sort voice control at the iTune end I have found in any event. At least there appears to be a “remote control” app for iTunes.
No rush then chap, I have only just got examples of google assistant running on C.H.I.P. I am going now to teach myself google activities et al as and I will start with voice control of the wifi sprinkler system I built on top of a WEMOS D1 R2. Currently it is running off google calendar events, but being able to also control it by voice, magic. That should be relatively smooth since there are google nodes for node-red.
So, I have a few things to sort before crashing google assistant and my wife’s punk collection on iTunes together. So thanks ahead of time and in your own time.
I note also there seems to be D-BUS implementations on node! I am using node-red to manage the house so that it a bonus!
Thanks again for the sharing your brilliant software!
Cheers, A
Sent from Mail for Windows 10
From: Mike Brady Sent: Saturday, 20 January 2018 10:43 PM To: mikebrady/shairport-sync Cc: Asterion Daedalus; Author Subject: Re: [mikebrady/shairport-sync] sharing the audio output with anotherapplication (#649)
Thanks for the interesting post. At present, Shairport Sync has no programmatic interface — it runs completely isolated as a daemon, so unfortunately, there isn’t a way of interacting with it to stop and start it locally. For the last few months, an effort has been underway to add a D-Bus interface. It’s not quite ready yet, though. To address your idea, it would need to be possible to disconnect and reconnect Shairport Sync from the audio output, possibly without disturbing the source. It might take a little while... — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
Fantastic -- I'd venture the opinion that your wife is a saint!
The title of this issue is very relevant to what I'd like to do, but the use case is different. Please let me know if I should start a new issue. Here's what I'd like to do.
The setup:
The goal:
Some Thoughts
Thanks for any tips from anyone!
I'm running into a similar issue where I'l like a voice control assistant and Shairport to be able to output over a headphone jack simultaneously.
I am using a Raspberry Pi 4 running a 100% local voice assistant. If I run a stream to shairport, then the voice comes through garbled, it at all. It seems Shairport is keeping the audio channel all to itself.
From what I can gather this is normal behaviour. It uses the hw
(or in my case plughw
) interface, which means it has/needs full hardware control.
I'd love it if there was a way to run Shairport in a less monopolistic way. I tried to run it with dmix
, but that resulted in an error: fatal error: audio_alsa: Sample format 3 not available for device "dmix:CARD=ArrayUAC10,DEV=0": Invalid argument
, which brings me back to an earlier issue.
// It seems to be very related to the specific USB device - a USB ReSpeaker v2. If I use the Raspberry Pi's sound card as the target, mixing various sources works fine.
This issue has been inactive for 60 days so will be closed 7 days from now. To prevent this, please remove the "stale" label or post a comment.
Not really a shairport-sync question but needs audio processing expert.
So, I am slowing trying to sort out getting google assistant running on the C.H.I.P.
I have a spare C.H.I.P. device so I have added a USB mic. Once google assistant is running on the C.H.I.P., I want to see if I can shairport-sync onto the same device.
I am likely wanting too much of the system but is there a way that you can "share" the audio output?
I will be using either of python or Jovo for the google assistant, so I am assuming I might need to something programmatic to allow the google assistant to take the audio output from, and then give the audio output back to, shairport-sync.
Nutty idea I know. But wife is way too fond of her iTunes collection so while we can play music through google home, Madam demands we keep the iTunes and I want fewer than more devices per room.