Repository navigation
Conversation
ZhuoenX
force-pushed
the
feature/add-audio-example
branch
4 times, most recently
from
October 11, 2026 12:54
f218e08 to
b62911a
Compare
- Add audio_demo.py with corrected API calls (all positional parameters) - Add complete audio.md API documentation - Fix: Remove MNN.numpy import (module does not exist) - Fix: Use positional parameters for all audio functions (METH_VARARGS) - Fix: Correct function names (hann_window not hanning_window) - Fix: mel_spectrogram limited to 4 int parameters due to binding bug - Fix: Remove fake constants (audio.HANNING, window type enums) - Fix: Correct all typos (sampe_rate -> sample_rate)
ZhuoenX
force-pushed
the
feature/add-audio-example
branch
from
October 11, 2026 17:46
b62911a to
bc11cf4
Compare
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.
The public audio wrappers supply all optional arguments to the native extension, but the spectrogram, mel_spectrogram, and melscale_fbanks parsing formats do not match those arguments. Correct the formats and parse boolean arguments into int temporaries before assigning bool fields, preventing adjacent-field corruption. Also fix hanning_window to call the registered native hann_window function.
Document the public Python API, its keyword support, real window constants, WAV I/O, and current spectral-feature behavior. Add a runnable WAV feature-extraction demo with optional output saving and explicit failures.
Validation on macOS arm64/Python 3.9.6:
Older packages with the affected bindings need a build containing these fixes. The existing sampe_rate keyword remains unchanged for compatibility.