Skip to content

liamappelbe/wav

Repository files navigation

wav

pub package Build Status Coverage Status

Simple tools for reading and writing WAV and raw audio files. Written in pure Dart, with no dependencies.

This package currently supports reading and writing 8/16/24/32 bit PCM, and 32/64 bit float formats. Other formats can be added as needed (just file a bug).

Usage

// Read a WAV file.
final wav = await Wav.readFile(filename);

// Look at its metadata.
print(wav.format);
print(wav.samplesPerSecond);

// Mess with its audio data.
for (final chan in wav.channels) {
  for (int i = 0; i < chan.length; ++i) {
    chan[i] /= 2;  // Decrease the volume.
  }
}

// Write to another WAV file.
await wav.writeFile(otherFilename);

About

Dart package for reading and writing wav files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages