Roon Voice Control with Siri and Google Assistant

I’ve published a couple of articles on how to enable voice control of Roon using either Apple Siri or Google Assistant. These guides can be found in the RoonCommandLine Wiki at:

These are not simple setups. I would consider these DIY projects for the tinkering minded. They do, however, work - at least in my environment. Both methods of voice control rely on the installation and configuration of a Roon command line interface provided by the RoonCommandLine Package. In addition to providing the convenience of voice control of Roon, the RoonCommandLine package enables automation of Roon actions and the ease/simplicity of command line control.

Siri voice control of Roon relies on the “Run script over SSH” option for Apple Scripting Shortcuts. on an iOS device. The Shortcut runs a shell command via SSH. The shell command runs a Python script that uses the Python Roon API to communicate with the Roon Core. Enabling and configuring SSH pose the highest hurdle for most.

Google Assistant voice control of Roon requires a MagicMirror with the
MMM-GoogleAssistant and MMM-Detector modules activated and configured properly. Setup for this method is considerably more difficult but once accomplished results in a superior quality setup with far more ease and flexibility of use.

RoonCommandLine releases can be installed on Debian based Linux systems, RPM based Linux systems, and MacOS. Debian and RPM format packages are provided for Linux deployment. Raspberry Pi deployments are also supported.

Let me know how to improve these how-to guides and what better ways you might suggest for voice control of Roon. Perhaps you have suggestions for easier use of the Google Assistant SDK to provide voice control or maybe Home Assistant has some cool way to do this. Enjoy!

7 Likes

I’ve updated the RoonCommandLine Wiki article on Roon Voice Control with Siri to include a note about how to invoke an SSH command in a login shell. Some Mac users were experiencing problems attempting to execute commands via SSH and running those commands in a login shell resolved the issue.

To run a Shortcut in a login shell preface the command you wish to run with bash -l -c ... and surround the command in quotes. For example, to run the command roon -r default in a login shell, when configuring the Shortcut Script, use the command:

bash -l -c "roon -r default"

See the Wiki article for detailed instructions.

1 Like

Is it possible to create a siri command that will play whatever artist you choose to say without having the command specifically scripted to do so? Or for each artist I want to play, would I have to create a separate shortcut? Thanks!

Yes, although I did not cover this in the article I wrote, it is possible to create a Siri Shortcut that passes the input to the RoonCommandLine command it triggers. For example, I have a shortcut called “Play Artist” that accepts an artist name to play.

In the “Play Artist” shortcut I have the “Run script over SSH” entry configured to be bash -l -c "play_artist 'Shortcut input'" where 'Shortcut input' is selected from the Input -> Choose Variable dropdown in the Run script over SSH action.

With this shortcut I can say “Hey Siri, play artist Jethro Tull” or “Hey Siri, play artist Deep Purple” so I don’t have to write separate shortcuts for different artists. This example uses the play_artist command but something similar could be done for other RoonCommandLine commands like play_album or play_playlist.

Siri does not always understand exactly what you mean and may transpose some artist names. But it works, for me, with most of my favorite artists.

1 Like

Thank you so much for getting back to me! I will give it a try! I’m still learning all this but pretty pleased I made it so far as to get it to play the radio to my default speaker :slight_smile:

I just wanted to report back that I can’t for the life of me get “shortcut input” to work with a verbally input command. However, I got “dictate text” to work. I basically say Hey Siri, Music By… and after a pause, it asks, what’s the text? And I tell it. And it plays. Not ideal, but I was really struggling with the other method. Maybe I don’t have something set up quite right.

@whims that’s good to know, thanks.

In general, no matter what method you use, voice control is finicky. I’m glad you found a method that works for you.

If you wish to pursue further shortcut attempts with RoonCommandLine you may wish to review the Apple Siri Setup and Troubleshooting Shortcuts sections of the article linked in this post. There are several “gotchas” with the setup. For example, from the Apple Siri Setup section:

Verify that SSH Shortcuts are working by creating a shortcut that performs a simple command like ping as described in the guides above. On recent versions of Apple’s iOS the Shortcuts setting for “Allow Running Scripts” is disabled. You may need to enable “Allow Running Scripts” in Shortcuts by visiting Settings -> Shortcuts on your iOS device and enabling “Allow Running Scripts”.

Maybe you need to enable “Allow Running Scripts”. Or, maybe it is something else. There are several SSH pitfalls. It must be enabled on the system where the command is run. SSH authentication must be configured properly. Sometimes the command must be run in a login shell. See “Troubleshooting Shortcuts” for some of these.

Maybe you are satisfied with what you have working and just want to get on with listening to music. Getting this to work can be tedious and we’re here to enjoy the music. Congratulations on getting this far!