Porcupine custom wake word

Hey guys!

First of all, thank you to all the devs and users that make my home automation fascination grow larger and my bank account getting smaller each day!

My question here today is: I have been using the Voice Assistant for a few weeks now. It is great, it understands and speaks European Portuguese (unlike Alexa or Google Assistant) and I have been able to tweak it to my liking.

My problem is with wake words: the pre-determined wake words work fairly well (OK Nabu, Alexa, etc.), albeit with quite a few false positives, but I would like to set a custom wake word in Portuguese. I want to use a name (“Ambrósio”) that checks a few boxes:

  • it’s an unusual first name but everyone knows it (it’s the name of the chauffeur in the PT version of the 1990s ad of Ferrero Rocher)
  • it’s kind of funny (see item above)
  • it has 4 syllables (not too short, not too long)
  • its sound is not very likely to be mistaken with other common words (the sound “ósio” is not very common in Portuguese)

For all these reasons, I’m dead set on making it work.

Here is what I have done so far:

  • I tried to train a openwakeword custom model (through Google Colab) by writing a phoneme in English that kind of sounds like “Ambrósio”, along the lines of Am-brah-zee-ooh.
    This does not work: HA recognizes the wake word only maybe 50-60% of the times, in a good day.

  • I tried (and achieved) to install the porcupine addon in HA, and I have trained a new model in Portuguese (here: Picovoice — Wake Word Detection & Keyword Spotting) but I can’t upload it to Home Assistant and make it work.

Can someone point me in the right direction? If using a custom wake word in Porcupine in HA is not possible, are there any other viable alternatives to bring Ambrósio to life?

Thanks for any help and keep up the good work and this great community!

André

PS: as hardware, I am using both a RPi3 with a ReSpeaker 2-mic HAT and a M5stack Atom.

For porcupine, it’s not possible , look at this

You can try snowboy addon as alternative

Thanks! I will try that.

I would also like that for Romanian language.
I would accept recording myself saying the wake-up word in Romanian 100 times (or more) if this will work better than trying to make an english voice spell something which technically is correct but doesnb’t at all sound Romanian …
How to create my Romanian wake-up word ?? (not by being pronounced by an English voice)

1 Like

Dead end… Snowboy only supports wake words in English or Chinese:

" Copy the WAV files to /share/snowboy/train/<language>/<wake_word> where <language> is either en for English or zh for Chinese (other languages are not supported). <wake_word> should be the name of your wake word, such as hey_computer (spaces in the same are not recommended)." - Snowboy addon documentation.

I don’t think that the language of personal wake words would matter, snowboy doesn’t do any speech to text processing, you can give it nonsense words and it’ll still recognize them. It wouldn’t matter to it whether the wake word was English, Portuguese, or Martian. Try training your preferred wake word on it using this online tool and see for yourself: http://snowboy.jolanrensen.nl/

Just wanted to add, train your personal wake word in a perfectly silent environment, ideally using the same device and mic that you plan to use it on, I had good luck with it after creating 24 audio samples, don’t ask me why that number worked, more would probably work too but I’m not going to mess with what worked.

1 Like

I confirm !
“French” wakeword in ‘en’ directory and full french pipeline working…

You can’t use custom wake words with porcupine v1 (which needs no access key to use).

But it is possible with porcupine v3 (although it needs an access key). I made an addon for it:

3 Likes

Thanks to you and Mike.
Just tested with my french accent and work like a charm

Great! Will try both options and stick with the one that works best.

Thank you, guys!

@andrezibaia could you give an update on your wakeword testing? Do you prefer Snowboy or Porcupine?

How is it working overall?

Hi, sure.

I have been using Porcupine with moderate success. A few false alarms and the assistant meddling in normal conversations. Not many, but still a menace to the WAF.

Not sure if it’s the wakeword engine or the mic sensitivity. Still have to test snowboy.

1 Like

I recommend you Davoice.io.
Here is the github - GitHub - frymanofer/ReactNative_WakeWordDetection: Create any wake word, deploy on any device and operating system.
It is an example for React Native - however Davoice supports any platform on any device.
And most importantly they will support any wake words such as “Ambrósio”

@andrezibaia did you manage to train the “Ambrósio” wake word, if so could you share it with me?

Hi renk1, sorry for the late reply…

I actually stopped using this, I have found the HA Voice Assistant (or the wyoming satellite, to be more precise) to be too unreliable: many false positives (it started talking when someone was having a conversation or in the middle of a movie), the system crashed for no apparent reason, etc.

I honestly don’t remember where I put the final files, but check if you have any luck with these: Unique Download Link | WeTransfer

Good luck!