Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Examples for configuring hotwords #76

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

timonvanhasselt
Copy link

No description provided.

A first try to add some extra useful info I got from the OVOS forum (Matrix), that helped me using hotwords.
Copy link
Member

@builderjer builderjer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a few typos and grammatical errors, that I am no good at fixing. I think some of the examples could be expanded upon. This is docs for new or casual users. They may not know what section they go in. Also maybe a link somewhere that describes what config file to be editing. https://openvoiceos.github.io/community-docs/config/

docs/ht_ww.md Outdated

* `“bus_event” : “mycroft.mic.mute"`

* Use a hotkey; allows you to assign a keyboard shortcut (e.g., "ctrl+alt+h") for triggering the hotword manually. The ovos_ww_hotkeys module is required forusing a hotkey.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any time you mention a plugin, ovos_ww_hotkeys try and put a link to it

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

forusing should be for using.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've checked the urls and typo.

docs/ht_ww.md Outdated
OVOS uses "wakewords" to activate the system. This is what "hey Google" or "Alexa" is on proprietary devices. By default, OVOS uses the WakeWord "hey Mycroft".
OVOS uses "wakewords" to activate the system. This is what "hey Google" or "Alexa" is on proprietary devices. By default, OVOS uses the WakeWord "hey Mycroft".

OVOS "hotwords" is the configuration section in `mycroft.conf` config to specify what the WakeWord do. Multiple "hotwords" can be used to do a variety of things from putting OVOS into active listening mode, a WakeWord like "hey Mycroft", to issuing a command such as "stop" or "wake up"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Grammar is not quite correct here, and in several other places.
I will refer @mikejgray to that though.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion:

In OVOS, a WakeWord is configured in the hotwords section of the user's mycroft.conf configuration (defaults to ~/.config/mycroft/mycroft.conf). Multiple "hotwords" can be configured at one time. They can trigger a variety of tasks, ranging from putting OVOS into active listening mode (the default for "hey Mycroft") to issuing a command such as "stop" or "wake up."

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks both! I tried to stay close to the original text and only add some extra info. I've followed your suggestion @mikejgray.

Copy link
Contributor

@mikejgray mikejgray left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great content and a welcome addition to the docs! I've made some grammatical suggestions and adjustments to syntax in config examples.

docs/ht_ww.md Outdated
OVOS uses "wakewords" to activate the system. This is what "hey Google" or "Alexa" is on proprietary devices. By default, OVOS uses the WakeWord "hey Mycroft".
OVOS uses "wakewords" to activate the system. This is what "hey Google" or "Alexa" is on proprietary devices. By default, OVOS uses the WakeWord "hey Mycroft".

OVOS "hotwords" is the configuration section in `mycroft.conf` config to specify what the WakeWord do. Multiple "hotwords" can be used to do a variety of things from putting OVOS into active listening mode, a WakeWord like "hey Mycroft", to issuing a command such as "stop" or "wake up"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion:

In OVOS, a WakeWord is configured in the hotwords section of the user's mycroft.conf configuration (defaults to ~/.config/mycroft/mycroft.conf). Multiple "hotwords" can be configured at one time. They can trigger a variety of tasks, ranging from putting OVOS into active listening mode (the default for "hey Mycroft") to issuing a command such as "stop" or "wake up."

docs/ht_ww.md Outdated

Each hotword can do one or more of the following (with example configs):
* trigger listening, also called a wake_word (default option)
* `“Listen” : “True”`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't quite right. The quotes are the wrong Unicode characters and will cause the config file to fail to load. Also, you need a boolean value instead of a string. Finally, the key is case-sensitive.

"listen": true

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oof, that wat very sloppy of me... I've rechecked all the unicode characters and boolean values.

docs/ht_ww.md Outdated
Comment on lines 10 to 11
* play a sound (only or with other action), you can set a specific sound per hotword.
* `"sound": "snd/start_listening.wav"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider mentioning that taking another action would require a plugin or skill to act on the bus message that is triggered by the WakeWord.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think leaving out the part about other actions (instead of only playing a sound) completely is maybe more clear, because the other lines that follow the "sound" config make that more clear (imho).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JarbasAl When I add the "utterance" config to the HotWord section AND "sound" to the hotword, the custom sound is not played.
So like this:

 "hotwords": {
    "hotkey": {
        "module": "ovos_ww_hotkeys",
        "listen": false,
        "active": true,
        "hotkey": "space",
        "utterance": "what time is it?",
        "sound": "snd/acknowledge.mp3"
      }
  }

Is that a possible issue or by design?

docs/ht_ww.md Outdated
Comment on lines 13 to 15
* emit a utterance to open a skill directly (instead of listen), useful to open skills from others.
* `“utterance” : “What’s the time”`
* `“listen” : “false”`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See previous note about quotes and booleans

docs/ht_ww.md Outdated
This example will start the date & time skill with the given utterance and not listen for a command.

* emit a bus event directly to the messagebus, to for instance open a skill you developed yourself (instead of listen / utterance), emit a message directly (microphone mute/unmute"
* `“bus_event” : “custom message that you use in your own skill”`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorrect quote characters. Also, consider custom.message.that.you.use.in.your.own.skill to match the pattern bus messages uses.

docs/ht_ww.md Outdated

or

* `“bus_event” : “mycroft.mic.mute"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quotes

docs/ht_ww.md Outdated

* `“bus_event” : “mycroft.mic.mute"`

* Use a hotkey; allows you to assign a keyboard shortcut (e.g., "ctrl+alt+h") for triggering the hotword manually. The ovos_ww_hotkeys module is required forusing a hotkey.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

forusing should be for using.

docs/ht_ww.md Outdated
Comment on lines 29 to 30
* assign a language for STT per wake word
* `Example?`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should have an example but I'm not sure what this syntax would be. Maybe @JarbasAl can chime in?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"stt_lang": "pt-pt" -> at STT stage then pt-pt will be requested instead of global lang

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added.

// unless explicitly disabled under "hotwords" section with "active": false. This is usually not
desired unless you are looking to completely disable wake word usage
"wake_word": "hey mycroft",
"stand_up_word": "wake up"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking for @JarbasAl confirmation that this syntax works as a wake word

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, Jarbas should review this one because of what it is.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

under the "listener" section you specify the default wake_word and stand_up_word

these will be automatically set active: true (unless you override it in the individual config of each word)

in single wake word mode you never set active flag in each definition, you only change this value. when using a backend for example this is the only thing that changes

Copy link
Author

@timonvanhasselt timonvanhasselt Sep 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a part I don't understand tbh, the difference between wake(up?)word and stand_up word as a hotword config.
So, I don't think my interpretation is helpful here, sorry. I've copied the comments text from the technical manual or the dinkum listener (If I recall correctly).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wake_word -> start listening, "hey mycroft"
stand_up_word -> come out of sleep mode , default to "wake up"

Copy link
Author

@timonvanhasselt timonvanhasselt Sep 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JarbasAl So If I understand correctly:

Hey Mycroft is standard wake word (configured in listener). But if I would like to have 'Hey Ziggy', as an extra wake word, that triggers a certain action, then I define 'Hey Ziggy' as a hotword and set it to active.

I think a complete example config (of listener + hotword sections) with a standard WW and extra hotwords would help a lot! Then we can explain the config and what every hotword do... Like your snowboy/ "self destruct video", that was for me an eyeopener that this configs were possible at all! I know the video is old, but it would help 'simple' users as me a lot :)

docs/ht_ww.md Outdated
@@ -58,4 +102,23 @@ If enabling a wakeword, be sure to also set `"listen": true`.

Multiple hotwords can be configured at the same time, even the same word with different plugins. This allows for more accurate ones to be used before the less accurate, but only if the plugin is installed.


### Example hotword config (keyboard wakeword)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be ## instead of ###, as this is not a sub-heading of "List of OVOS WakeWord Plugins"

Changes after review
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants