Sounds - Random Phrases

Dear Community,

is it possible to change the wake wav sound to some random phrases?
Since we always have to wait for the wake to happen and we can’t immediatly start with our input i thought of having an answer to the wakeword like “how can i help?”, “hm?”, “yes?”, “what do you want?”. If its always the same its probably not that immersive.

i think about possible solutions:

  1. Having a script replacing the wake wav sound file with a random one from another path.
  2. Instead of just playing a wav use the TTS engine to produce a new one.

Did already somebody do a similar thing?

LG Jay

Hey! It has been discussed previously here:

Cheers

1 Like

Ah, thank you.

Seems like nobody tried it though… i think i’ll try a little .wav copy script for that matter than…

Alright. I just implemented it like this:

Created a folder with sentences i wanted as a response:
Since i use google wavenet i just used the rhasspy web ui to say some texts and took the created .wav files from the cache folder.

then i wrote the following bash script:

#!/usr/bin/env bash
files=(/home/pi/.config/rhasspy/profiles/de/sounds/wake/*.wav)
cp ${files[RANDOM % ${#files[@]}]} /home/pi/.config/rhasspy/profiles/de/sounds/start_of_input.wav

in sounds i just got following wake path:
${RHASSPY_PROFILE_DIR}/sounds/start_of_input.wav

and since i don’t know any hooks in rhasspy i just used my node-red to run that script via exec node (ssh pi@J4-K4 "sudo /home/pi/.config/rhasspy/profiles/de/sounds/changewake.sh") when i get a stop listening over MQTT.

Probably not the best way and i don’t like the use of my node-red there, but at least i can control it with different smart-home functions i already got there and extend it to answer special things with different conditions (e.g. time of day).

all the best
jay

2 Likes