From efcf8a4add00ce5a6bc9ed387ccb7f78cf01bfc9 Mon Sep 17 00:00:00 2001 From: Tater Totterson Date: Sun, 2 Nov 2025 09:53:03 -0600 Subject: [PATCH] update --- microWakeWord_training_notebook.ipynb | 33 ++++++++++++++++++++------- requirements.txt | 3 --- 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/microWakeWord_training_notebook.ipynb b/microWakeWord_training_notebook.ipynb index 1693955..9b5d728 100644 --- a/microWakeWord_training_notebook.ipynb +++ b/microWakeWord_training_notebook.ipynb @@ -44,25 +44,26 @@ }, "outputs": [], "source": [ - "# Installs microWakeWord. Be sure to restart the session after this is finished.\n", "import platform\n", "import sys\n", "import os\n", "\n", + "# mac-only helper deps\n", "if platform.system() == \"Darwin\":\n", - " # `pymicro-features` is installed from a fork to support building on macOS\n", " !\"{sys.executable}\" -m pip install 'git+https://github.com/puddly/pymicro-features@puddly/minimum-cpp-version' --root-user-action=ignore\n", "\n", - "# `audio-metadata` is installed from a fork to unpin `attrs` from a version that breaks Jupyter\n", "!\"{sys.executable}\" -m pip install 'git+https://github.com/whatsnowplaying/audio-metadata@d4ebb238e6a401bb1a5aaaac60c9e2b3cb30929f' --root-user-action=ignore\n", "\n", - "# Clone the microWakeWord repository (your fork)\n", - "repo_path = \"./microWakeWord\"\n", + "# 👇 use the actual location in the container\n", + "repo_path = \"/data/microWakeWord\"\n", + "\n", "if not os.path.exists(repo_path):\n", - " print(\"⬇️ Cloning microWakeWord repository...\")\n", + " print(\"⬇️ Cloning microWakeWord repository to /data…\")\n", " !git clone https://github.com/TaterTotterson/micro-wake-word.git {repo_path}\n", "\n", - "# Install editable\n", + "# optional: pin to a commit\n", + "# !cd /data/microWakeWord && git checkout ac6502bf48b5e372c47ed509f5f5ca181e6d50bb\n", + "\n", "if os.path.exists(repo_path):\n", " print(\"📦 Installing microWakeWord...\")\n", " !\"{sys.executable}\" -m pip install -e {repo_path} --root-user-action=ignore\n", @@ -454,8 +455,24 @@ "# Sets up the augmentations.\n", "# To improve your model, experiment with these settings and use more sources of\n", "# background clips.\n", + "import sys, os\n", "\n", - "import os\n", + "# try the common places we’ve used\n", + "candidates = [\n", + " \"/data/microWakeWord\", # what the last install log showed\n", + " \"/data/microwakeword\", # lowercase variant\n", + " \"./microwakeword\", # local clone\n", + " \"./microWakeWord\", # camel case\n", + "]\n", + "\n", + "for base in candidates:\n", + " if os.path.isdir(base):\n", + " # add the repo root\n", + " sys.path.insert(0, base)\n", + " # add the actual package dir inside the repo\n", + " if os.path.isdir(os.path.join(base, \"microwakeword\")):\n", + " sys.path.insert(0, os.path.join(base, \"microwakeword\"))\n", + " break\n", "from microwakeword.audio.augmentation import Augmentation\n", "from microwakeword.audio.clips import Clips\n", "from microwakeword.audio.spectrograms import SpectrogramGeneration\n", diff --git a/requirements.txt b/requirements.txt index 55c7f3d..29592c4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -36,6 +36,3 @@ jupyterlab==4.3.4 ipywidgets==8.1.5 matplotlib-inline==0.1.7 rich==13.9.4 - -# --- microWakeWord --- --e git+https://github.com/kahrendt/microWakeWord@ac6502bf48b5e372c47ed509f5f5ca181e6d50bb#egg=microwakeword