Request: Local Audio-In as a provider #1156
Replies: 15 comments 16 replies
-
|
You should add this to the discussion in the music provider poll 2 https://github.com/orgs/music-assistant/discussions/1169 |
Beta Was this translation helpful? Give feedback.
-
|
It's in the poll! Sounds interesting. Curious what the use cases people have in mind for this? |
Beta Was this translation helpful? Give feedback.
-
|
I voted for this in the poll, then i realised its audio in, not out. Whats the use case for audio in? |
Beta Was this translation helpful? Give feedback.
-
|
For example a turntable. There are ways and means, but simple would be good. |
Beta Was this translation helpful? Give feedback.
-
|
The sonos port also has an audio input. The challenge is that there is no meta data, so it won't be searchable in the library. |
Beta Was this translation helpful? Give feedback.
-
|
I'm using PCP (picoreplayer) that sets up a stream that I can listen to from music assistant. It's not "simple", but it works, and works everywhere. |
Beta Was this translation helpful? Give feedback.
-
|
If this was added might it be a step towards enabling MA as a Chromecast and Airplay receiver to enable sending audio streams to MA from apps that MA otherwise couldn't access (e.g. BBC Sounds)? |
Beta Was this translation helpful? Give feedback.
-
|
Would a AUX input port from an ADC (Analog to Digital Converter) Audio Capture Device also be counted as a source for "Local Audio-In"? Personally I would really love it if was able to get audio input from such analog audio sources like a turntable (LP vinyl record player) into Music Assistant by being able to simply select "Local Audio-In" as a music provider. As per my related feature request here: That would made it much easier and way more user-friendly function than the hoops you have to jump through to get a solution for it today. Ex: |
Beta Was this translation helpful? Give feedback.
-
|
Oh, and remember to vote for this in the new Music Provider Feature Request Poll: |
Beta Was this translation helpful? Give feedback.
-
|
FYI, check out these indirectly related patches with a new feature which will add a media proxy to Home Assistant core and extend the media player info in ESPHome with a list of supported audio formats which can then be used in Home Assistant to swap out media URLs going to the ESPHome device with proxy URLs that contain the converted audio. That should allow you to at least capture the audio at best possible sample rate and then have Home Assistant automatically convert it to the higest format that the player is capable of:
I wish support for this new media proxy in Home Assistant core will implemented in Music Assistant and that someone makes a plugin or plug-and-play audio provider for getting audio stream directly from a local (USB) audio capture device into Music Assistant which can automatically use this to resample, transcode and mux it to best possible supported format before sending on to the player provider. Again, also suggest that please check out and join this related feature request discussion: Perhaps more active discussions in those will draw the attention and interest of a devleloper with the skills and time to make those ideas happen. |
Beta Was this translation helpful? Give feedback.
-
|
@@Torrax Is the idea that music provider for "Local Audio-In" will only be able to access audio-input locally from different "sound cards" directly from Music Assistant server stand-alone and Music Assistant add-on running in Home Assistant Operating System as an ADC-input appliance?
The specific use case I am wondering is the scenario of buying and connecting a compatible retail USB-soundcard direct to the USB-port on official Home Assistant Green and/or Home Assistant Yellow (or similar Raspberry Pi 4 / Raspberry Pi 5 HAOS installations) for LP-turntables. Asking this since just spottet this new pull request by @sairon for HAOS that will add driver for Creative Sound Blaster X-Fi sound card series: If so then I suggest also testing/verifying compatibility with these popular "high-fidelity" quality USB Audio Device ADC-adapters that uses the USB Audio Class 2.0 pipeline to support high-definition audio formats up to 192KHz and 32bits using a standard digital audio interface:
Another option as "ADC" (Analog to Digital Converter) input instead of a USB Audio Device that should provide the same function are HiFiBerry's ANALOG INPUT products like "HIFIBERRY DAC+ ADC PRO", "HIFIBERRY DAC2 ADC PRO", or "HIFIBERRY DAC+ ADC" as input. As a bonus those should provide a very clean and almost the look of an all-in-one commercial appliance if using with a Raspberry Pi setup (and the official HiFiBerry cases for Raspberry Pi for matching enclosure):
For reference, see these related guides/tips for Hi-Fi analog to digital used or Vinyl Record Player / LP Turntable to Music Assistant streaming:
PS: Again there is a related discussion here but that is more about having a remote audio-in applicance instead of having it built-into the Music Assistant server which will limit you to a single audio input source and not allow you to place the audio-input device anywhere in your home: |
Beta Was this translation helpful? Give feedback.
-
|
@Hedda yes as OzGav outlined, this should cover pretty much the whole line on USB Sound Cards you provided. Your MA server just sees these devices as ALSA input devices so anything internal or external your system detects as an input devices should work with this plugin. You just set the options to what ALSA device you want to stream the sound from then you can set a thumbnail image and name for the source so you can set up multiple USB cards if you want with different sources like a Vinyl Player, Bluetooth Reciever ect.. I have tested it an overall it does work pretty well, but a couple fixes I need to implement before full release. |
Beta Was this translation helpful? Give feedback.
-
|
Created a discussion for another potential use case... leveraging MA + Sendspin as a surround sound receiver for video streaming boxes: |
Beta Was this translation helpful? Give feedback.
-
|
I think pipewire delay would be extremely minimal, it is used for real time music production (e.g. live VST effects) and is a replacement for JACK. Pipewire would be better than alsa in my opinion because then you could grab individual playback streams from anything running linux. For example from my gaming pc I could pipe the playback from my browser into it but not the playback from the game I am currently playing. All this while still letting you do the more standard approach of grabbing the device input audio device or bluetooth a2dp input from the actual server running music assistant. Check out helvum which is a gui patch bay for pipewire. |
Beta Was this translation helpful? Give feedback.
-
|
FYI; for reference, someone has submitted a draft pull request which would add support for a new source/sender role to Sendspin-clients here: There is also a direcly related development discussion here about how support for audio input could be added to the Sendspin protocol spec: PS: Noted that it looks like development of the draft pull request for adding Local Audio Source Provider for Music Assistant server has stalled, or at least @Torrax has not yet addressed the reviews with request for changes that other developers posted there: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I don't know if that's possible, but I miss the local audio-in as a provider. It would be nice if I could select my local audio-in of the sound card (Hifiberry) as a provider.
So far, a huge thank you to all developers involved - good job!
Beta Was this translation helpful? Give feedback.
All reactions