Skip to content
pubscout

wav

1.5.0, released a year ago by an unverified publisher

Pure Dart library for reading and writing WAV and raw audio files.

WASM-ready
$ flutter pub add wav
Source repository

What it does

Provides simple tools to read WAV or raw audio files, inspect their metadata and sample data, modify the samples, and write the result back. Supports 8‑32‑bit PCM and 32/64‑bit float formats on all major platforms.

AI-written summary of version 1.5.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to parse, edit, or generate WAV files in a pure‑Dart environment
  • Cross‑platform projects where adding native audio libraries is undesirable

Skip it when

  • You require real‑time audio playback or recording
  • You need support for compressed or non‑PCM audio formats
  • Streaming large audio files without loading them entirely into memory

Strengths

  • Zero external dependencies – works everywhere Dart runs
  • Supports multiple PCM bit depths and float formats
  • Simple, synchronous API for reading and writing files

Weaknesses

  • No playback or recording capabilities
  • Cannot write WAVE_FORMAT_EXTENSIBLE files
  • Limited to PCM/float formats only

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
0
final wav = await Wav.readFile('input.wav');
print(wav.format);
print(wav.samplesPerSecond);
for (final chan in wav.channels) {
  for (int i = 0; i < chan.length; ++i) {
    chan[i] /= 2; // decrease volume
  }
}
await wav.writeFile('output.wav');

Alternatives

Packages that do the same job and could replace wav.

Works with

Packages commonly used together with wav: ones it builds on, ones built on it, and its own family.