Skip to content

1. Installation

Seongnoh Sean Yi edited this page Jul 10, 2024 · 4 revisions

Install

1. Install SOX for the backbone audio framework.

You need to install sox at the beginning.

For MacOS

brew install sox

For most Linux distro's (including Raspbian)

sudo apt-get install sox libsox-fmt-all

For Windows

TODO (Help needed.)

As far as I know, Windows11 already has SoX by default, but not sure.

2. Install MMM-Hotword2

cd <MagicMirror Directory>/modules
git clone https://github.com/MMRIZE/MMM-Hotword2
cd MMM-Hotword2
npm install

3. Get PICOVOICE AccessKey

  1. Join PICOVOICE and get an accessKey. (Forever-Free plan might have some limitations but would be enough for private use.)
  2. Open the .env file (or copy from env.example), then put the accessKey into it.
## .env
PICOVOICE_ACCESS_KEY=#FILL_YOUR_ACCESS_KEY

4. Recording Device (Mic)

You need a microphone (Any USB mic is OK). When you execute the MM with this module, the backend log will show which device you can use.

[2024-07-10 23:13:53.322] [LOG]   Module helper loaded: MMM-Hotword2
[2024-07-10 23:13:53.322] [LOG]   All module helpers loaded.
[2024-07-10 23:13:53.324] [LOG]   Starting server on port 8080 ...
[2024-07-10 23:13:53.522] [LOG]   Connecting socket for: MMM-Hotword2
[2024-07-10 23:13:53.529] [LOG]   [HOT2] Available devices: [
  '0: Microphone Array(USB PnP Audio Device)',
  '1: Microphone(Logitech BRIO)'
]
[2024-07-10 23:13:53.530] [LOG]   Sockets connected & modules started ...
[2024-07-10 23:13:53.536] [LOG]   Launching application.
[2024-07-10 23:13:53.935] [INFO]  updatenotification: Updater Class Loaded!
[2024-07-10 23:13:53.935] [INFO]  updatenotification: Checking PM2 using...
[2024-07-10 23:13:53.986] [INFO]  Checking git for module: MMM-Hotword2
[2024-07-10 23:13:53.992] [LOG]   [HOT2] All previously recorded files are deleted.
[2024-07-10 23:13:53.992] [LOG]   [HOT2] Hotword added: COMPUTER PRE_DEFINED
[2024-07-10 23:13:53.992] [LOG]   [HOT2] Hotword added: JARVIS PRE_DEFINED
[2024-07-10 23:13:54.681] [LOG]   [HOT2] MIC device: Microphone Array(USB PnP Audio Device)
[2024-07-10 23:13:54.682] [LOG]   [HOT2] Detector started

Clone this wiki locally