boyhagemann/wave
A Laravel package for generating and working with audio waveforms. Extract waveform data from audio files via a simple API, making it easy to add audio previews, players, and visual waveform displays to PHP applications.
WAVE_FORMAT_EXTENSIBLE, 24-bit samples, odd-sized chunk padding, and files with unexpected metadata chunks. This package is a credible "buy" (in the open-source sense) that removes that tail risk for a well-bounded format.Consider it when all of the following hold:
ffprobe/sox for a narrow need — shared hosting, restricted containers, or a team that doesn't own media infrastructure.Look elsewhere when:
ffmpeg/ffprobe (via a maintained wrapper like PHP-FFMpeg) or a managed service. This package reads; it does not transform.getID3 covers far more containers and codecs, albeit with a heavier, older codebase.ffprobe call is cheaper than adding a dependency.To executives: This is a small, low-cost open-source utility that lets us validate and characterize WAV audio uploads without adding media-processing infrastructure. It supports the audio features already on the roadmap at roughly a day of integration effort, and it keeps our deployment footprint unchanged — no new services, no new binaries. The main caveat is that it's a small community project, so we should treat it as a contained tactical dependency with a documented fallback to ffprobe if it stops being maintained. It is not a platform decision.
To engineering: It's a pure-PHP WAV reader — header metadata plus PCM sample access. That removes our most annoying edge cases (RIFF chunk walking, extensible headers, 24-bit samples, odd-byte padding) for the narrow WAV path. Two asks before we adopt: a timeboxed spike to confirm it handles our real fixture set and memory profile on our largest expected file, and a short note on our exit path — most likely swapping the reader behind a small internal AudioMetadataReader interface so a later move to ffprobe is a one-file change. If the spike shows gaps, we fall back to ffprobe and lose at most a day.
How can I help you explore Laravel packages today?