Skip to content

Fix automatic_model_training.ipynb for Python 3.12 / torchaudio 2.x compatibility#326

Open
Tinevagio wants to merge 1 commit intodscripka:mainfrom
Tinevagio:main
Open

Fix automatic_model_training.ipynb for Python 3.12 / torchaudio 2.x compatibility#326
Tinevagio wants to merge 1 commit intodscripka:mainfrom
Tinevagio:main

Conversation

@Tinevagio
Copy link
Copy Markdown

torchaudio.set_audio_backend deprecated
torchaudio.info removed
generate_samples.py missing
AudioSet 404 → replaced by FMA
onnxscript missing for ONNX export

@Tinevagio
Copy link
Copy Markdown
Author

Hi! I spent several hours trying to get this notebook working on Google Colab
in April 2026 and ran into multiple compatibility issues with Python 3.12 and
recent versions of torchaudio/torch_audiomentations.

This updated notebook fixes:

  • torchaudio.set_audio_backend deprecated
  • torchaudio.info removed in torchaudio 2.x
  • generate_samples.py missing (not auto-generated anymore)
  • AudioSet download returns 404 → replaced by FMA dataset
  • onnxscript missing for ONNX export

Tested and working end-to-end, successfully trained "hey snowy" wake word model.

@Anshsurana123
Copy link
Copy Markdown

heyy!! how to use this fix??
cause i need to train a model by today itselff

@Anshsurana123
Copy link
Copy Markdown

m getting this error - Entraînement en cours...

❌ Erreur code 1
Traceback (most recent call last):
File "/content/openWakeWord/openwakeword/train.py", line 823, in
input_shape = np.load(os.path.join(feature_save_dir, "positive_features_test.npy")).shape[1:]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/numpy/lib/_npyio_impl.py", line 455, in load
fid = stack.enter_context(open(os.fspath(file), "rb"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/content/my_custom_model/jaag_ruut/positive_features_test.npy'

@Anshsurana123
Copy link
Copy Markdown

no worries, i built and updated the pipline

@Tinevagio
Copy link
Copy Markdown
Author

Tinevagio commented Apr 5, 2026 via email

@Anshsurana123
Copy link
Copy Markdown

Do you have a working Colab link for the fixed notebook? I've been trying to train a custom wake word all day and hitting shape mismatch errors in data.py and train.py.

@Tinevagio
Copy link
Copy Markdown
Author

Tinevagio commented Apr 6, 2026 via email

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.

2 participants