Skip to content

Commit

Permalink
fix:ww from config (#1)
Browse files Browse the repository at this point in the history
* fix:ww from config

* Update README.md
  • Loading branch information
JarbasAl authored Oct 25, 2024
1 parent 6a663d2 commit a05a48a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ pip install -r requirements.txt

run `ovos_simple_listener/__main__.py` in place of ovos-dinkum-listener, plugins are selected from the default OVOS config `~/.config/mycroft/mycroft.conf`

> NOTE: wake word currently hardcoded to "hey mycroft", multiple wake words are NOT supported
## Library Usage

To use `ovos-simple-listener`, you can initialize it with the desired components (microphone, STT, VAD, and wake word) as shown in the example below:
Expand Down
5 changes: 3 additions & 2 deletions ovos_simple_listener/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from ovos_plugin_manager.wakewords import OVOSWakeWordFactory
from ovos_utils.fakebus import FakeBus
from ovos_utils.log import LOG

from ovos_config import Configuration
from ovos_simple_listener import ListenerCallbacks, SimpleListener


Expand Down Expand Up @@ -46,10 +46,11 @@ def text_callback(cls, utterance: str, lang: str):


def main():
ww = Configuration().get("listener", {}).get("wake_word", "hey_mycroft")
t = SimpleListener(
mic=OVOSMicrophoneFactory.create(),
vad=OVOSVADFactory.create(),
wakeword=OVOSWakeWordFactory.create_hotword("hey_mycroft"),
wakeword=OVOSWakeWordFactory.create_hotword(ww),
stt=OVOSSTTFactory.create(),
callbacks=OVOSCallbacks()
)
Expand Down

0 comments on commit a05a48a

Please sign in to comment.