Repository navigation
4.4.0: run models that take sound (includes 4.3.0) - #28
Merged
Merged
Conversation
- sendDataset takes labels over time ranges; addLabels adds them to an existing dataset - a label for the whole dataset was dropped for a dataset that only holds recordings; with recordings the labels are now sent last, so that label covers them too
OnnxPredictor reads manifest schema 2 (models with a sound input, or several inputs, and windows of a fixed duration): - addAudio / addPcm16 take sound at any sample rate; it is mixed to mono and converted to the model's rate by a streaming windowed-sinc resampler that filters out what would alias. - Sensors are interpolated onto the model's grid, as in training, and predict() classifies the latest window of sound and sensors, aligned in time. predictInputs classifies given windows; isReady tells when enough is buffered. Sensor models (schema 1) take the same path as before. Training options take preset and audio. Exports Resampler. Adds examples/example-audio-web, which classifies the microphone live, and fixtures exported by the backend with Python reference scores. Part of edge-ml/edge-ml#100
The Flutter library's fixtures are made with the same script. Part of edge-ml/edge-ml#100
Includes the unreleased 4.3.0 (labels over time ranges).
hamza-aamer
marked this pull request as ready for review
November 26, 2026 03:38
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Run models that take sound (manifest schema 2). Part of edge-ml/edge-ml#100. Needs edge-ml/ml#95 and #96.
Version 4.4.0, including the unreleased 4.3.0 (labels over time ranges). Merging to
mainpublishes 4.4.0 to npm.addAudio/addPcm16take sound at any rate, which goes through a streaming windowed-sinc resampler (anti-aliased) to the model's rate.predictaligns sound and sensors in time.predictInputs,isReady,windowMs,audioSampleRate,edgeML.Resampler.presetandaudio.examples/example-audio-webclassifies the microphone live.Checked:
mixed_cnnmodel streamed a held-out subject (44.1 kHz WAV + accelerometer) and got 325/325 windows right.