Reduce peak memory usage by ~362 MB for 4-min audio
- Remove debug members (last_power_spectrum, log1p_input_cpp) from MelSpectrogram, saving ~61 MB that persisted across the full pipeline - Release mono_audio immediately after resampling to free ~42 MB early - Convert float→double per chunk inside resample_audio instead of pre-allocating a full-size double copy, saving ~84 MB - Replace O(T×N) Viterbi backtrack matrix with checkpointed approach (K=sqrt(T) interval): peak BT memory drops from ~181 MB to ~6 MB while producing bit-identical output (verified by diff on test audio) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0155xf2TorZZUxwf5ZDfixvg
M
Masaki committed
a09fb43c12d8402003492d684af24942889f952d
Parent: e9e6094