151 Commits

Author SHA1 Message Date
George Joseph
cb81f7f02d Train from the command line
The files in the `cli` directory allow you to train wake words
from the command line without needing to use the Jupyter notebook
or a web browser.  Basically, the logic from the notebook has been
placed in separate shell scripts and python files wrapped by 3 high-level
scripts that do the following:

* setup_python_venv: Creates a Python virtual environment with all the
packages needed to train.  The venv is created in the container's /data
directory and is therefore stored on the host, not in the container's root
docker volume.

* setup_training_datasets: Downloads, extracts and converts the MIT RIR,
FMA, Audioset and Negative training reference datasets.  Also stored in /data.

* train_wake_word: Generates the wake word samples, augments them with the
audio from the training datasets, and finally runs the microwakeword training.
The resulting model tflite and json files are placed in the /data/output
directory.

See the README.md file for much more information.
2025-12-28 12:48:51 -07:00
Tater Totterson
4dd7503248 Delete .DS_Store 2025-12-22 20:24:59 -06:00
MasterPhooey
f1282bef8e piper speaking speeds 2025-12-22 20:03:18 -06:00
MasterPhooey
1f57796858 Revert "piper speaking speeds"
This reverts commit 1c954eb253.
2025-12-22 19:55:11 -06:00
MasterPhooey
1c954eb253 piper speaking speeds 2025-12-22 19:44:09 -06:00
Tater Totterson
99eaaa39cd Merge pull request #15 from gtjoseph/main-fix-notebook
Update notebook to fix issues with environment inheritance.
2025-12-20 14:26:58 -06:00
George Joseph
dc92dc7d8b Update notebook to fix issues with environment inheritance.
Two issues:

* The notebook cell that actually runs model_train_eval was running it in a
  subprocess so while it inherited environment variables from the running
  python kernel, it couldn't inherit the tensorflow environment from it.
  This resulted in the `set_memory_growth(g, True)` and
  `mixed_precision.set_global_policy("mixed_float16")` calls in the previous
  cell to be lost.

* TFlite doesn't support "mixed_float16" anyway and causes the model export to
  fail spectacularly so it's kind of a good thing it wasn't being applied.

So..

* The tensorflow environment variable and memory_growth setting code was moved
  from the notebook cell that also wrote the config yaml to the next cell
  which does the train and test.  This leaves the "config" cell to just write
  the yaml.  This is really just a cosmetic change to group functionality
  better.

* The code that tried to set "mixed_float16" has been removed but since setting
  memory_growth to true is a good thing, the model_train_eval is now run using
  runpy instead in a subprocess.  This way it's run in the same python kernel
  instance and tensorflow environment as the rest of the notebook and inherits
  the memory_growth setting.

Resolves: #14
2025-12-20 10:22:33 -07:00
Tater Totterson
5487f0869e Merge pull request #13 from gtjoseph/main-switch-base-image
Switch from nvidia/cuda to plain ubuntu:22.05 base image
2025-12-20 07:53:32 -06:00
George Joseph
74b36885b5 Switch from nvidia/cuda to plain ubuntu:22.05 base image
Since this is a pure Python environment, the CUDA toolkit isn't really
necessary. The various Python packages that can use CUDA will download
and install the CUDA dependencies they need.  This shaves off at least
8gb from the final image.

The Python package install order needed to be tweaked to ensure onnxruntime,
tensorflow and torch are installed in that order.  Any other order results
in dependent cuda package clashes.

Resolves: #12
2025-12-19 10:14:26 -07:00
Tater Totterson
7c9c6f7a88 Add files via upload 2025-12-05 07:44:13 -06:00
Tater Totterson
efcf8a4add update 2025-11-02 09:53:03 -06:00
Tater Totterson
a78ccba056 Delete mww_tater directory 2025-11-02 09:52:34 -06:00
Tater Totterson
9ad63fef34 fixes 2025-11-02 05:08:13 -06:00
Tater Totterson
31677fa74b fixes
thanks @ mitrokun
2025-11-02 04:44:24 -06:00
Tater Totterson
c9aeb17091 Add files via upload 2025-09-30 19:16:36 -05:00
Tater Totterson
c6fe612143 Add files via upload 2025-09-27 19:44:55 -05:00
Tater Totterson
901097d60e Create tt 2025-09-27 15:30:18 -05:00
Tater Totterson
763fe7409a cleanup 2025-09-27 15:26:43 -05:00
Tater Totterson
bdac2263a5 Update README.md 2025-09-27 15:04:16 -05:00
Tater Totterson
cef3daa1a7 cleanup 2025-09-27 14:55:23 -05:00
Tater Totterson
1aad7969e4 Delete basic_training_notebook.ipynb 2025-09-27 11:11:41 -05:00
Tater Totterson
449e40ef8b Delete advanced_training_notebook.ipynb 2025-09-27 11:11:32 -05:00
Tater Totterson
e9d6b8b87e cleanup 2025-09-27 11:10:43 -05:00
Tater Totterson
3eea499f90 Add files via upload 2025-09-26 19:41:21 -05:00
Tater Totterson
6cbe5dc394 Update README.md 2025-09-26 19:39:28 -05:00
Tater Totterson
51715d5553 Update README.md 2025-09-26 19:39:07 -05:00
Tater Totterson
277c5526f7 Update README.md 2025-09-26 19:38:32 -05:00
Tater Totterson
afa5adb794 Add files via upload 2025-09-26 19:36:45 -05:00
Tater Totterson
7137c55482 Add files via upload 2025-09-26 19:35:09 -05:00
MasterPhooey
088761cedd Update README.md 2025-06-22 21:46:31 -05:00
MasterPhooey
350bc56dae Update README.md 2025-06-08 08:26:20 -05:00
MasterPhooey
a0d1b5560a Update README.md 2025-06-08 08:25:50 -05:00
MasterPhooey
7d3d8fcbe7 Update README.md 2025-06-08 08:23:25 -05:00
MasterPhooey
8286c736eb Update README.md 2025-06-08 06:56:17 -05:00
MasterPhooey
02e9eaa5c6 Update README.md 2025-06-08 06:44:59 -05:00
MasterPhooey
0dbcdebb0a Update README.md 2025-06-08 06:26:39 -05:00
MasterPhooey
90d7ea5f0c Update README.md 2025-06-08 06:26:08 -05:00
MasterPhooey
139025af5d Update README.md 2025-06-08 06:25:49 -05:00
MasterPhooey
7de2531c3f Update advanced_training_notebook.ipynb 2025-01-20 09:10:06 -06:00
MasterPhooey
5d16c5db26 Update advanced_training_notebook.ipynb 2025-01-19 16:47:09 -06:00
MasterPhooey
4464d9e481 Update advanced_training_notebook.ipynb 2025-01-19 16:44:14 -06:00
MasterPhooey
4d25fc3051 Update advanced_training_notebook.ipynb 2025-01-19 15:45:38 -06:00
MasterPhooey
f2368903d2 Update advanced_training_notebook.ipynb 2025-01-08 20:57:36 -06:00
MasterPhooey
b9be19db0d Delete norman_mww.tflite 2025-01-08 20:54:50 -06:00
MasterPhooey
0fb5015998 Add files via upload 2025-01-08 20:53:05 -06:00
MasterPhooey
1cde601bda Update advanced_training_notebook.ipynb 2025-01-05 18:31:47 -06:00
MasterPhooey
03fb3fa0e2 Update advanced_training_notebook.ipynb 2025-01-05 18:30:22 -06:00
MasterPhooey
f8cdb149d9 Update advanced_training_notebook.ipynb 2025-01-05 16:48:34 -06:00
MasterPhooey
8d1289ed49 Update advanced_training_notebook.ipynb 2025-01-05 16:47:10 -06:00
MasterPhooey
cc962f2069 Update advanced_training_notebook.ipynb 2025-01-05 15:46:31 -06:00