New Piper TTS in NodeRed?

Howdy,
I was wondering if anyone has figured out how to use the new Piper TTS in Node-RED?

I currently use voicerss_say in a NR node to announce messages, and was hoping the new Piper integration had a way to do this. I have not seen any examples in the Piper documents yet.

Thanks

2 Likes

will follow this one

1 Like

Hello,

Please, try call to service:

Data:
{"message":"hello","media_player_entity_id":"media_player.raspiaudio_muse_proto"}
OR
{"message":msg.payload,"media_player_entity_id":"media_player.raspiaudio_muse_proto"}

It is working for me. I use paspiaudio proto.

What I still do not understand is the cache behaviour. It seems that the “message” attributes is not taking into account for the current order, but it is used in the next call to the service.

I am still triying to make it to tell right message and not the previous one.

Hope it helps to fing the proper configuration.

Regards

1 Like

Hello again,

The previous configuration works with sentences. It does not works for single words, but for me it is not related with node red, is more with Piper itself.
Rsgards

I have the same problem, where it will keep the last message since a cache clear and repeat that instead of the new message sent to it. even if cache is false.

this seems to be a bug in Home assistant’s tts.speak service, running tts.clear_cache, then running i again will cause it to speak the correct message, but then you’re stuck with that one until the next cache clear.

I found my issue, from another thread. I have DLNA speaker setup, and piper is not working with DLNA right now. Thanks for the suggestions.

@Gardanjerte - Thanks for sharing how to use Piper in NR! I was trying to figure out a way to play a message on my doorbell (Unifi Doorbell G4) using internal TTS to speed things up and keep as much as possible local in my setup.

How fast do your TTS messages play? I am currently testing my NR code using an Echo as the player and it takes about 3 seconds before it speaks a 3 second long sentence. That seems a bit too slow considering I have other alerts played by an echo and they are much faster. In other words, Piper appears to be the bottleneck.

Thanks @aruffell for reminding me about this. Thanks @Gardanjerte for your detailed example above. I was able to get Piper working with my DLNA speaker now.

I did further testing and it seems like the majority of the delay is introduced by the Echo as the message plays a lot faster on my Unifi doorbell. I am doing this to greet those pesky solicitors… lol. Any suggestions welcome! For now I am just testing “Doorbell broken, please yell DING DONG!”

Does anyone know how to select different piper voices using node red?

Pretty sure you can specify the name in the options block of the data object of the call. For example:

{"media_player_entity_id":"media_player.speaker_office","message":"My name is aru","options":{"voice":"en_GB-aru-medium"}}

I just grabbed the values for the voice from the Piper config drop down.

Hope that helps!

1 Like

Worked!
Thank you!