Reads uncompressed 16-bit PCM WAV files directly – pulsatrix's first audio primitive (campaign_exai_dl_library_data_pipeline, Phase 4, Decision Point 4: hand-rolled over libsndfile, same "narrowest thing that satisfies the exit gate" reasoning as Decision Points 1/2/6).
More...
#include <wav_reader.hpp>
Reads uncompressed 16-bit PCM WAV files directly – pulsatrix's first audio primitive (campaign_exai_dl_library_data_pipeline, Phase 4, Decision Point 4: hand-rolled over libsndfile, same "narrowest thing that satisfies the exit gate" reasoning as Decision Points 1/2/6).
- Note
- Assumes the canonical fixed-order RIFF/WAVE/fmt/data chunk layout (no support for extra chunks like LIST/INFO before the data chunk) – a real, documented limitation, matching MnistIdxLoader's own fixed-header-layout precedent rather than a general chunk scanner.
◆ Load()
- Parameters
-
| path | Path to a WAV file. |
| backend | Backend to allocate the output waveform Tensor through. Not owned. |
- Returns
- The decoded waveform and its sample rate.
- Exceptions
-
| std::runtime_error | if the file can't be opened, isn't a valid RIFF/WAVE file, isn't PCM, isn't 16-bit, or is shorter than its own declared data size – external boundary (file content, not an internal invariant). |
The documentation for this class was generated from the following file: