AirPlay Integration - Changing voices

I am working on some rules to utilize AirPlay integrations on HomePods. I am struggling to keep the change of voice from Matthew.

If I change the voice in the device and send a test message as, say Joanna, I get a female vioce. When I exit out and go back, it changes back to Matthew as it does if I hit the save preferences.

I have also poked around in Rule Machine's Custom Actions and Send Message and see that I can change most everything except the voice. Am I missing the place to change this and have it stick?

Thanks in advance!

Open Settings and then Hub Details. There is an option there to change the default voice used.

1 Like

Ok, Forgot that was there from the last time I saw it when I didn't need it.

Thanks for the quick response.

1 Like

Ok bonus round. Is there the ability to change the voice utilizing rules. So, calling a name in a rule before doing the announcement?

Good question. Perhaps via a variable?

Looks like the built-in RM action can't do this, but you can use a custom action/command and just choose speak() as that command. You'll need to provide the three parameters listed for this command on the device detail page, the text to speak (string), volume (number), and voice (string).

Changing the voice and saving anything on the device detail page won't work; you'll see those are parts of commands, not preferences. You can only save the value of preferences. Commands are just things you run, and the UI will revert to default values for the displayed options, if any, every time you reload the page, which I assume is what you mean that you are seeing (and is normal). There is only the hub-wide default setting for this, mentioned above.

Perfect, I think the three parameters were the key. I tried the custom action and speak but didn’t call out all three.

Thanks!

Glad that worked! However, there is only one required parameter, the first one, the text to speak (so if that didn't work, there was probably another problem). Volume is technically optional, but I'm not certain there's a way to pass null with a custom command in RM, so all three should definitely work as well like it is for you. Not that the rest matters if this is working for you, but maybe someone else would find it helpful in the future. :smiley:

Yes, when originally tested, I had typed the in the name and it spoke “Joanna” and then I scratched my head and went to the community.

I don't see "Voice" as a command option, if I'm understanding correctly... which I may not be.

You'd need to use the speak() command (this is what I meant above) then you'll get the option to add parameters. The voice option is one of those. The parameters for the speak command are the same ones, in the same order and required vs. optional status, that you see on the device detail page for your device for this command.

If you have problems, it may be best to back up a bit and state what you are trying to do and what you have done so far, though the above looks like a good start once you get the right command.

Got it. So it should look like this for others who are curious... Thanks.

1 Like