# Picroft - Custom wakeword not accurate

**URL:** https://community.openconversational.ai/t/picroft-custom-wakeword-not-accurate/11799
**Category:** Archive - Former Random Mycroft Category
**Created:** [January 19, 2022, 9:39am UTC](https://community.openconversational.ai/t/picroft-custom-wakeword-not-accurate/11799 "2022-01-19T09:39:59Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![HirschiL](https://community.openconversational.ai/letter_avatar_proxy/v4/letter/h/ba8739/32.png) [@HirschiL](https://community.openconversational.ai/u/HirschiL)
#### Post date: [January 19, 2022, 9:39am UTC](https://community.openconversational.ai/t/picroft-custom-wakeword-not-accurate/11799/1 "2022-01-19T09:39:59Z")

</div>

I’m trying to make a custom wakeword. I’m following this guide: [Training your own wake word](https://github.com/MycroftAI/mycroft-precise/wiki/Training-your-own-wake-word#how-to-train-your-own-wake-word). Here are my steps to do my wake word:

- precise-collect
- precise-train
- precise-train-incremental
- precise-test
- precise-listen
- precise-convert

After I have done all those steps, I configurate a json file with this command:

```auto
mycroft-config edit user

```

Here is my config:

```auto
{
  "max_allowed_core_version": 21.2,
  "listener": {
    "wake_word": "hey-nestore"
  },
  "hotwords": {
    "hey-nestore": {
      "module": "precise",
      "local_model_file": "/home/pi/mycroft-precise/hey-nestore.pb",
      "sensitivity": 0.1,
      "trigger_level": 10
    }
  }
}

```

Sensitity to 0.1 to prevent false positives and trigger\_level to 10 to prevent Mycroft to unintentionally activate.

Then I reload the config with:

```auto
mycroft-config reload

```

And finally lauch the client with:

```auto
mycroft-cli-client

```

Now, with my model and my training (don’t forget that I have done the “precise-train-incremental” training too), the detection of my wakeword is very inaccurate. When clapping in my hand, the client detect my wakeword.  
Am I the only one, who can’t make an accurate model ?

---

<div class="post-metadata">

### Author: ![ale](https://community.openconversational.ai/user_avatar/community.openconversational.ai/ale/32/3549_2.png) [@ale](https://community.openconversational.ai/u/ale)
#### Post date: [January 21, 2022, 1:59am UTC](https://community.openconversational.ai/t/picroft-custom-wakeword-not-accurate/11799/2 "2022-01-21T01:59:27Z")

</div>

I’ve just trained my own wake-word (i.e.‘Hey Doc’) and it works quite well.

I can share my experience, I can’t tell you that’s the best way to train a wake-word, but I achieved a good result.

These are my tips:

**Wake-word**

- Collect ~ 400 samples
- Vary speed, inflection, volume, tone, distance from mic
- Change the mic
- Record the voice of as many people as possible

**Not wake-word**

- Should be ~ 4000 samples
- Use `precise-listen <wake-word>.net -d <wake-word>/not-wake-word` to record word(s) similar to the wake-word (rhymes, same prefix same suffix etc)
- Use the bunch of long audio files here [http://downloads.tuxfamily.org/pdsounds/pdsounds\_march2009.7z](http://downloads.tuxfamily.org/pdsounds/pdsounds_march2009.7z) and here [http://download.tensorflow.org/data/speech\_commands\_v0.02.tar.gz](http://download.tensorflow.org/data/speech_commands_v0.02.tar.gz)
- Execute `precise-listen <wake-word>.net -d <wake-word>/not-wake-word` while you are watching a film or a series on Netflix or whatever
- Execute `precise-listen <wake-word>.net -d <wake-word>/not-wake-word` and let it runs for days so that all spurious activations due to normal noises and sounds in the house (flapping doors, appliances, people’s speeches etc) will be automatically inserted in the not-wake-word folder

**Training**

- Use 1000 or 2000 epochs, e.g. `precise-train -e 1000 <wake-word>.net <wake-word>/`
- Copy all the wav files from wake-word folder to the test/wake-word folder, the same for the not-wake-word
- Training steps
  1. Collect and train with wake-word
  2. Add not wake-word similar to the wake-word recorded and train again
  3. Incremental train with the bunch of long audio
  4. Add not wake-word registered during a film or due to a “home noise” and train again

**Mycroft.conf setup**

- sensitivity: 0.2 or 0.3,
- trigger\_level: 7 or 8

There is also this link with lots of tips for training the wake-word: [localcroft/Precise.md at master · el-tocino/localcroft · GitHub](https://github.com/el-tocino/localcroft/blob/master/precise/Precise.md)

---

<div class="post-metadata">

### Author: ![baconator](https://community.openconversational.ai/letter_avatar_proxy/v4/letter/b/d07c76/32.png) [@baconator](https://community.openconversational.ai/u/baconator)
#### Post date: [January 21, 2022, 8:38pm UTC](https://community.openconversational.ai/t/picroft-custom-wakeword-not-accurate/11799/3 "2022-01-21T20:38:02Z")

</div>

And @sparkyvision has a more updated guide as well: [GitHub - sparky-vision/mycroft-precise-tips: mycroft-precise-tips](https://github.com/sparky-vision/mycroft-precise-tips)

---

<div class="post-metadata">

### Author: ![HirschiL](https://community.openconversational.ai/letter_avatar_proxy/v4/letter/h/ba8739/32.png) [@HirschiL](https://community.openconversational.ai/u/HirschiL)
#### Post date: [January 25, 2022, 10:47am UTC](https://community.openconversational.ai/t/picroft-custom-wakeword-not-accurate/11799/4 "2022-01-25T10:47:37Z")

</div>

Thanks for sharing your experience with me. Have you done some tests with the accuracy that your wakeword gives to you ? If you try to run the command: `precise-test` with your wakeword, what is the statistics of it ?

---

<div class="post-metadata">

### Author: ![ale](https://community.openconversational.ai/user_avatar/community.openconversational.ai/ale/32/3549_2.png) [@ale](https://community.openconversational.ai/u/ale)
#### Post date: [January 27, 2022, 9:46pm UTC](https://community.openconversational.ai/t/picroft-custom-wakeword-not-accurate/11799/5 "2022-01-27T21:46:08Z")

</div>

Sure, I did it!

Here are my stats:

```auto
=== Counts ===
False Positives: 1
True Negatives: 3731
False Negatives: 7
True Positives: 422

=== Summary ===
4153 out of 4161
99.81 %

0.03 % false positives
1.63 % false negatives

```

---

<div class="post-metadata">

### Author: ![puchatek](https://community.openconversational.ai/letter_avatar_proxy/v4/letter/p/6bbea6/32.png) [@puchatek](https://community.openconversational.ai/u/puchatek)
#### Post date: [January 14, 2024, 12:29pm UTC](https://community.openconversational.ai/t/picroft-custom-wakeword-not-accurate/11799/6 "2024-01-14T12:29:30Z")

</div>

> Sensitity to 0.1 to prevent false positives and trigger\_level to 10 to prevent Mycroft to unintentionally activate.

What is the difference between a false positive and an unintentional activation?
