Node-roon-api-audioinput

Is this a new API that can be used to create a 3rd party audio input directly in Roon ie. a Spotify (Librespot) or AirPlay (Shairport) sink, without having to setup a pseudo radio station?

It looks like someone has already tried to build a Spotify (Librespot) relay using this API?

4 Likes

There seem to be some follow-up activities going on in the form of the Roon Connect Stream Example (which sounds like an interesting development).

I gave it a try but my production core doesn’t provide the audioinput service:

Enter command (? for help) >
-> REQUEST 1 com.roonlabs.registry:1/register {"extension_id":"com.roonlabs.roon_connect_stream_example","display_name":"Roon Connect Stream Example","display_version":"1.0.0","publisher":"Roon Labs, LLC","email":"contact@roonlabs.com","required_services":["com.roonlabs.audioinput:1","com.roonlabs.transport:2"],"optional_services":[],"provided_services":["com.roonlabs.settings:1","com.roonlabs.status:1","com.roonlabs.pairing:1","com.roonlabs.ping:1"],"website":"https://github.com/RoonLabs/roon-connect-stream-example"}
<- COMPLETE 1 NotCompatible {"required_services_missing":["com.roonlabs.audioinput:1"]}

@danny Can you share anything about if / when this will become available in early-access / production?

1 Like

As far as I can see from the sources there is a “play” method that garbs the audio content from a URL and stream this to Roon.

This means you still need a webserver that delivers the audio stream but you don’t have to set up a radio station for the audio stream manually any more.

Not too bad :+1: :+1:

Triggered by this topic I ran the “Roon Connect Stream Example” again but now against production server build 1357. There is no longer a NotCompatible error and help can be requested. Haven’t tried more than this (yet).

$ node test.mjs 

Enter command (? for help) > ?
Commands:
  help, ?
    print help

  exit, quit, bye, ^C
    exit

  play <stream>
    play the stream in roon -- must be one of the Roon-supported stream formats

  stop
    stop playback and release the zone back to Roon

  vol up|down|<number>
    change the volume up or down, or set it to a specific number
2 Likes

Seems to work quite nicely.

I just sent it a radio stream to test (after enabling the extension and selection a zone):

Enter command > play https://stream-relay-geo.ntslive.net/stream

And it popped up straight away in Roon…

Looks like you can set an icon for the input source too :slightly_smiling_face:

(obv. still need an external application to send / relay audio to it, but far better than the current clunky workaround of having to setup a pseudo radio station)

2 Likes

If I’m back from South East Asia in April I will add that to rooPlay. With this the users don’t have to manually add a Radio station to make it run :+1: :smiley:

Best DrCWO

1 Like

Any idea how this can be achieved?

Based on the screenshot @j_a_m_i_e posted, the icon is shown left from the zone icon (the puppy with the “MY BRAND” text). An image url can be set in the object passed to the play method.

node-roon-api-audioinput also has an update_track_info method, suggesting that the metadata shown can be updated at track transition.

1 Like

What’s the delay like?

Let me guess: Same like starting a radio station :wink:

Hi Jan,

any update here? Have you had a chance to do some testing on this?

I haven’t done any additional testing as @j_a_m_i_e reported that it works in the post after mine. Also because I do not have plans to make use of the audio input service.

Thanks! Right, I guess there is little or no difference between a radio station url and the audio input (url)

I will figure it out when I‘m back from traveling end of April. Plan to implement it in rooPlay so the manual configuration of the rooPlay radio station can be omitted in future.

2 Likes