Dart package for reading and writing wav files

Related tags

Media wav
Overview

wav

pub package Build Status Coverage Status

Simple tools for reading and writing WAV 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);
You might also like...

Image Extensions A wrapper library for image package with some extra functions.

A wrapper library for image package with some extra functions. Installation Add this to your package's pubspec.yaml file: dependencie

Jan 15, 2022

Audio classification Tflite package for flutter (iOS & Android).

Audio classification Tflite package for flutter (iOS & Android).

Audio classification Tflite package for flutter (iOS & Android). Can also support Google Teachable Machine models.

Dec 1, 2022

BC Image Editor - Flutter package for image editing

BC Image Editor - Flutter package for image editing

BC Image Editor You can edit image using this package and also you can create flex preview image by setting foreground to null. For now, you can use o

Nov 21, 2022

Unleash Client SDK for Dart and Flutter

Unleash Client SDK for Dart and Flutter

Unleash Client SDK for Dart and Flutter This is an unofficial Unleash Client SDK

Oct 6, 2021

This Flutter plugin created to show how to use OpenCV and ZXing C++ libraries natively in Flutter with Dart FFI using the camera stream

OpenCV and ZXing C++ libraries natively in Flutter with Dart FFI using the camera stream

Oct 21, 2022

A simple video streaming application made with Dart, JavaScript, HTML, CSS

A simple video streaming application made with Dart, JavaScript, HTML, CSS

streamZ A simple video streaming application made with Dart, JS, HTML, CSS & ❤️ Show some ❤️ by putting ⭐ Recently I wrote an article, explaining how

Nov 23, 2021

A simple YouTube Music Client written in Dart using Flutter Framework with @microsoft Fluent design guidlines

A simple YouTube Music Client written in Dart using Flutter Framework with @microsoft Fluent design guidlines

A simple YouTube Music Client written in Dart using Flutter Framework with @microsoft Fluent design guidlines

Jan 7, 2023

Apps For streaming audio via url (Android, iOS & Web ). Developed with Dart & Flutter ❤

Apps For streaming audio via url (Android, iOS & Web ). Developed with Dart & Flutter ❤

Flutter Sleep App (Dicoding Submission : Learn to Make Flutter Apps for Beginners) Stream Great collection of high-definition sounds that can be mixed

Nov 29, 2022

Simple peer-to-peer with WebRTC for Dart. PeerJS port for Flutter.

PeerDart: Simple peer-to-peer with WebRTC PeerDart provides a complete, configurable, and easy-to-use peer-to-peer API built on top of WebRTC, support

Jan 8, 2023
Comments
  • [BUG] WAV is corrupted or not a WAV File?

    [BUG] WAV is corrupted or not a WAV File?

    Hi, its me again :D

    Thanks for package. Im not sure if its my side or your.

    I'm recording voice by flutter_sound plugin and so my config looks like this:

    SampleRate: 16000 Channels: 1 BitRate: 16000 Codec: PCM16

    I can read later that file and display it but your package throws me error like below:

    flutter: \^[[38;5;196m┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────<…>
    flutter: \^[[38;5;196m│ \^[[0m\^[[39m\^[[48;5;196mFormatException: WAV is corrupted, or not a WAV file.<…>
    flutter: \^[[38;5;196m├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄<…>
    flutter: \^[[38;5;196m│ #0   TwLogger.e (package:tw_utils/logger/logger.dart:52:18)<…>
    flutter: \^[[38;5;196m│ #1   main.<anonymous closure> (package:chat/main.dart:64:14)<…>
    flutter: \^[[38;5;196m│ #2   _RootZone.runBinary (dart:async/zone.dart:1658:54)<…>
    flutter: \^[[38;5;196m│ #3   runZonedGuarded.<anonymous closure> (dart:async/zone.dart:1800:18)<…>
    flutter: \^[[38;5;196m│ #4   _Zone._processUncaughtError (dart:async/zone.dart:1073:14)<…>
    flutter: \^[[38;5;196m│ #5   _CustomZone.handleUncaughtError (dart:async/zone.dart:1277:5)<…>
    flutter: \^[[38;5;196m│ #6   Future._propagateToListeners (dart:async/future_impl.dart:680:16)<…>
    flutter: \^[[38;5;196m│ #7   Future._completeError (dart:async/future_impl.dart:574:5)<…>
    flutter: \^[[38;5;196m│ #8   _completeOnAsyncError (dart:async-patch/async_patch.dart:318:13)<…>
    flutter: \^[[38;5;196m│ #9   _rootRunBinary (dart:async/zone.dart:1415:47)<…>
    flutter: \^[[38;5;196m├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄<…>
    flutter: \^[[38;5;196m│ ⛔ ***** Main runZonedGuarded() --> ErrorHandler<…>
    flutter: \^[[38;5;196m└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────<…>
    

    Link to example file recorded by flutter_sound uploaded to firestore - https://firebasestorage.googleapis.com/v0/b/tradewind-internal-f4761.appspot.com/o/voice_records%2Fvoice_2022-10-24T20%3A32%3A46.993797.wav?alt=media&token=e9891dc3-98b5-4592-9dfb-e112377dbae4

    I would be grateful if you could tell me if that config is not supported or just my recorded files are corrupted. Thanks in advance!

    EDIT 1:

    We have found out that we should save files as pcm not wav. Do you know any way to achieve converting pcm to wav file?

    opened by PcolBP 9
Owner
Liam Appelbe
Liam Appelbe
A small image utils package for flutter written in dart.

flutter_simple_image_utils A small image utils package for flutter written in dart. Usage: import 'package:flutter_simple_image_utils/flutter_simple_i

Hamlet D'Arcy 1 Nov 18, 2021
Mpv dart - MPV player's JSON IPC binding for Dart

MPV Dart MPV Player's JSON-IPC binding for Dart (Flutter Supported) Installation

Kingkor Roy Tirtho 11 Nov 24, 2022
A flutter package for iOS and Android for applying filter to an image

Photo Filters package for flutter A flutter package for iOS and Android for applying filter to an image. A set of preset filters are also available. Y

Ansh rathod 1 Oct 26, 2021
Flutter package for creating a fully customizable and editable image widget.

EditableImage Flutter Package Flutter package for creating a fully customizable and editable image widget. The package has been written solely in Dart

Bulent Baris Kilic 5 Jun 13, 2022
A Flutter package for both android and iOS which provides Audio recorder

social_media_recorder A Flutter package for both android and iOS which provides

subhikhalifeh 16 Dec 29, 2022
This is a flutter package of video player. it's a very simple and easy to use.

This is a flutter package of video player. it's a very simple and easy to use.

初冬 184 Nov 18, 2022
Flutter video trimmer package

A Flutter package for trimming videos Features Customizable video trimmer Video playback control Retrieving and storing video file Also, supports conv

Souvik Biswas 349 Jan 3, 2023
Enhanced pub package commands.

Enhanced pub package commands. Add latest resolvable package Remove dependency View package info Like/unlike/view liked pub.dev packages Improved conf

Leo Farias 14 Oct 19, 2022
A lightweight flutter package to simplify the creation of a miniplayer.

A lightweight flutter package to simplify the creation of a miniplayer by providing a builder function with the current height and percentage progress

David Peters 80 Dec 18, 2022
Collection of extension function of just_audio package for auto-handle caching

just_audio_cache Collection of extension function of just_audio package for auto-handle caching audio files How to use The premise is you already have

Yoda 10 Aug 24, 2022