You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add YAMNet subprocess backend and auto-resampling for classification (#505)
* Add AST + YAMNet to classification docs and model registry
- classification/doc.md: AST and YAMNet added to Models section
(organized by category: scene, demographics, content)
- model_registry.yaml: new audio_scene_classification section
- model_registry.md: regenerated
- Fixed generate_model_registry.py path (docs/ → src/senselab/)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Add __all__ to all task/workflow modules for clean pdoc docs
Without __all__, pdoc shows internal submodules (api, huggingface,
etc.) as navigation items. With __all__, pdoc only shows the public
API functions — what users actually need.
Applied to 21 task modules + 1 workflow module across audio, video,
text, and utils.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Fix review: YAMNet TF note, music genre link, model registry source
- YAMNet: noted as TensorFlow-based, not directly supported via classify_audios
- Music genre model link: config.json → main model card
- Model registry: YAMNet source changed from huggingface to tensorflow
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Add YAMNet subprocess venv backend and auto-resampling for classification
- YAMNet runs in isolated TF subprocess venv (tensorflow, tensorflow-hub)
- Accessible via classify_audios(audios, model="yamnet")
- Auto-resamples to 16kHz inside the loop (memory-efficient)
- HF classifier now auto-resamples instead of erroring on wrong sample rate
- Updated doc.md and model_registry to reflect YAMNet as fully supported
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Fix mypy: cast model.path_or_uri to str for hf_hub_download
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Apply ruff format to yamnet.py
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: src/senselab/audio/tasks/classification/doc.md
+9-1Lines changed: 9 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,10 +9,18 @@ Audio Classification refers to the broad category of tasks of processing audio i
9
9
A variety of models are supported by ```senselab``` for audio classification tasks. They can be explored on the [Hugging Face Hub](https://huggingface.co/models?library=transformers&pipeline_tag=audio-classification&sort=downloads). Each model varies in performance, size, license, language support, and more. Like with many models and tasks, performance may also vary depending on who the speaker is in the processed audio clips (there may be differences in terms of age, dialects, disfluencies). It is recommended to review the model card for each model before use. Also, always refer to the most recent literature for an informed decision. Unlike other tasks, the exact classification task will be based off of the dataset and class labels used to train the model, such that even two models using the same dataset might classify the audios into different categories (e.g. the LibriSpeech dataset could be used to classify age and/or gender based on the audio clips).
10
10
11
11
Some popular models for different classifications include:
12
+
13
+
**Auditory Scene / Sound Event Classification:**
14
+
-[Audio Spectrogram Transformer (AST)](https://huggingface.co/MIT/ast-finetuned-audioset-10-10-0.4593) — 521 AudioSet classes (speech, music, environmental sounds, animals, etc.). Recommended for general-purpose scene analysis.
15
+
-[YAMNet](https://tfhub.dev/google/yamnet/1) — Google's AudioSet classifier (521 classes). TensorFlow-based; runs in an isolated subprocess venv via `classify_audios(audios, model="yamnet")`.
0 commit comments