Skip to content

feat(audio): add an Audio Inspector tool (closes #94) - #95

Merged
vibhavkatre merged 1 commit into
developfrom
feat/audio-inspector
Aug 6, 2026
Merged

feat(audio): add an Audio Inspector tool (closes #94)#95
vibhavkatre merged 1 commit into
developfrom
feat/audio-inspector

Conversation

@vibhavkatre

Copy link
Copy Markdown
Collaborator

Summary

Import any audio file the browser can decode and see its duration, channel count, size, type and a waveform — decoded locally, nothing uploaded. No dependencies, no licensing.

Accuracy note: decodeAudioData resamples to the AudioContext's rate, so the decoded sample rate isn't the file's. The true sample rate and bit depth are read straight from the WAV header when the file is a WAV; compressed formats contribute duration, channels and the waveform, with a note that sample rate/bit depth are WAV-only.

  • Pure formatting + WAV-header parsing (audioInfo.js) is unit-tested; the waveform reuses the editor's computePeaks.
  • Registered as the audio-inspector tool.

Verification

  • vitest 710 green (93 files; +8 for formatting + header parsing).
  • Build clean. Verified live on :8100: a 44.1 kHz stereo WAV reports Sample rate 44,100 Hz (from the header — not the resampled 48 kHz) and 16-bit, with correct duration/channels/size and a waveform. No console errors.

Closes #94

🤖 Generated with Claude Code

Import any audio file the browser can decode and see its duration, channel
count, size, type and a waveform — decoded locally, nothing uploaded. No
dependencies, no licensing.

Because decodeAudioData resamples to the AudioContext's rate, the decoded
sample rate is not the file's. So the true sample rate and bit depth are
read straight from the WAV header when the file is a WAV; compressed
formats contribute duration, channels and the waveform, with a note that
sample rate/bit depth are WAV-only.

- Pure formatting + WAV-header parsing (`audioInfo.js`) is unit-tested;
  the waveform reuses the editor's `computePeaks`.
- Registered as the `audio-inspector` tool.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vibhavkatre
vibhavkatre merged commit b9fb20b into develop Aug 6, 2026
@vibhavkatre
vibhavkatre deleted the feat/audio-inspector branch August 6, 2026 05:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add an Audio Inspector (Web Audio, no deps)

1 participant