A Flutter plugin to extract waveform data from an audio file suitable for visual rendering.

Overview

just_waveform

This plugin extracts waveform data from an audio file that can be used to render waveform visualisations.

waveform screenshot

Usage

final progressStream = JustWaveform.extract(
  audioInFile: '/path/to/audio.mp3',
  waveOutFile: '/path/to/waveform.wave',
  zoom: const WaveformZoom.pixelsPerSecond(100),
);
progressStream.listen((waveformProgress) {
  print('Progress: %${(100 * waveformProgress.progress).toInt()}');
  if (waveformProgress.waveform != null) {
    // Use the waveform.
  }
});
Comments
  • Hide logs in console

    Hide logs in console

    How can we hide logs?

    Example:
    wave length = 1712
    waveHeader[0] = 1
    waveHeader[1] = 0
    waveHeader[2] = 16000
    waveHeader[3] = 160
    waveHeader[4] = 651
    Total scaled samples: 1302
    waveHeader[0] = 1
    waveHeader[1] = 0
    waveHeader[2] = 16000
    waveHeader[3] = 160
    waveHeader[4] = 856
    
    opened by loic-hamdi 10
  • Extract waveform from audio  as uint8list

    Extract waveform from audio as uint8list

    First thanks for the awesome package , i see that the package extract the wave form audio to a wave file . i wonder if there is a way to extract the wave as (uint8list ) format . Kind regards

    opened by BenCherif 7
  • Attempt to invoke virtual method 'int java.lang.Integer.intValue()'

    Attempt to invoke virtual method 'int java.lang.Integer.intValue()'

    For starters, thanks for this great plugin.

    I'm encountering a problem on Android only, when i extract the data from the audio file I get this error

    PlatformException(Attempt to invoke virtual method 'int java.lang.Integer.intValue()' on a null object reference, null, null, null)

    I'm using the same code from the example with a few modifications

    final audioFile = File(widget.audioFilePath);
    
        try {
          final dir = await getApplicationDocumentsDirectory();
          final waveFile = File('${dir.path}/waveform.wave');
    
          JustWaveform.extract(
            audioInFile: audioFile,
            waveOutFile: waveFile,
            zoom: WaveformZoom.pixelsPerSecond(
              pixelPerSecond.ceil(),
            ),
          ).listen(_progressStream.add, onError: _progressStream.addError);
        } catch (err) {
          _progressStream.addError(e);
        }
    

    I'm having this problem on an Android device on 9.0.

    Many thanks.

    opened by AhmedbGayess 6
  • Example code load asset error

    Example code load asset error

    Hi, I am first tring flutter develop and just_waveform. I tried to run example but it got error message: Unable to load asset: audio/waveform.mp3. Can help me to know where I got wrong? pic

    opened by alphatero 5
  • Frozen on 99% while generating.

    Frozen on 99% while generating.

    I just added that package on my flutter project. Awesome package. But I met to frozen waveform generate on 99% while creating. If anyone has some solutions for that, Please let me know.

    === My flutter doctor ===

    Doctor summary (to see all details, run flutter doctor -v):
    [✓] Flutter (Channel stable, 3.0.6-0.0.pre.2, on macOS 12.5.1 21G83 darwin-x64, locale en-LA)
    [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    [✓] Xcode - develop for iOS and macOS (Xcode 13.4)
    [✓] Chrome - develop for the web
    [✓] Android Studio (version 2021.2)
    [✓] VS Code (version 1.71.0)
    [✓] VS Code (version 1.54.2)
    [✓] Connected device (3 available)
        ! Error: JinYZ’s iPhone has recently restarted. Xcode will continue when JinYZ’s iPhone is unlocked. (code -14)
    [✓] HTTP Host Availability
    

    === My Test Device === Samgsung A20

    Thanks.

    opened by BlackGold-1989 5
  • large mp3 file size error

    large mp3 file size error

    When I try to load an mp3 file around 3mb it returns the error PlatformException(ExtAudioOpenURL error, ExtAudioOpenURL error, null, null)

    Have you tested with any max large files?

    opened by putheng 4
  • PlatformException(ExtAudioOpenURL error, ExtAudioOpenURL error, null, null)

    PlatformException(ExtAudioOpenURL error, ExtAudioOpenURL error, null, null)

    Hi. I get this error when try extract file from audio.

    PlatformException(ExtAudioOpenURL error, ExtAudioOpenURL error, null, null).

    This is only in the iOS version. Everything works fine on android.

    Thera are my files path:

    file:///Users/user/Library/Developer/CoreSimulator/Devices/DAB4C89D-6849-460A-A4C7-C1E2D7A81125/data/Containers/Data/Application/D7974DA8-ED71-480B-B289-36CE72899032/tmp/BDC72317-B389-4F46-8CE3-1A24A37172A9.m4a

    file:///Users/user/Library/Developer/CoreSimulator/Devices/DAB4C89D-6849-460A-A4C7-C1E2D7A81125/data/Containers/Data/Application/D7974DA8-ED71-480B-B289-36CE72899032/tmp/BDC72317-B389-4F46-8CE3-1A24A37172A9.wave

    I am working on a simulator, can this be the problem?

    opened by han-tm 3
  • extract from ipod-library

    extract from ipod-library

    I'm gettings songs with flutter plugin on_audio_query which returns song.uri likes ipod-library://item/item.flac?id=4724756324520404040, how can I extract wavefrom from this.

    Thanks.

    opened by LondonX 2
  • Question: Cant follow along with example code

    Question: Cant follow along with example code

    I am trying to get a visualization bar in my app for audio. I am checking out your plugin and in the example page you have a line..

    final progressStream = BehaviorSubject<WaveformProgress>();

    Where does BehaviourSubject come from? I searched the page and that was the only reference to the name anywhere

    opened by Technorocker 1
  • Is it possible to extract audio from Stream?

    Is it possible to extract audio from Stream?

    Hello,

    Thanks a lot for your nice plugin. One question: Is it possible to render the waveform for an audio-stream that is being recorded? I use your package just_audio and the package record: ^3.0.3 to do recordings.

    Best regards, MapperMalte

    opened by MapperMalte 1
  • Question : Whats codecs are supported with this plugin

    Question : Whats codecs are supported with this plugin

    In my app I use aac codec or audio format files and i will like to get the wave form so i am see the use of mp3 in the examples and i am led to believe thats the only codec supported ?

    opened by davidAg9 1
  • How to cancel the waveform processing before done?

    How to cancel the waveform processing before done?

    I have added that package to my flutter project. But when move before and next page, I met a issue for percent change one. The percent value is return the previous and current ones. Could you help me for that issue?

    opened by BlackGold-1989 2
  • add support window

    add support window

    Hello,

    Thank you for this plugin.

    We create an app of meditation and sound relaxing named Evolum (4.9 stars in stores). We wanted to add audio wave in our app. As you know we can't get the audiowave file on the file directly in the app when an user want to relax.

    We have a dashboard where internal user can upload audio to be available in the app.

    This dashboard is web so we can't generate the audiowave file so we wanted to do by deploying our dashboard in macOS but some of our internal user have only window...

    We try to doc something with Google Cloud function when a file is uploaded in our storage with that

    https://github.com/bbc/audiowaveform

    but we didn't successed...

    So if adding window support is not a big challenge maybe that can be usefull for us.

    Thanks,

    opened by yelkamel 2
  • Add cancel method to cancel the ongoing extraction

    Add cancel method to cancel the ongoing extraction

    Thanks for this awesome plugin.

    Also add the method to cancel the ongoing extraction. If it is possible to cancel the extraction without adding any new method then please mention it in the documentation.

    opened by sagarkardani 0
Releases(v0.0.4)
Owner
null
Flutter plugin to listen to the process text intent stream.

Flutter Process Text Plugin Show some ❤️ and ⭐ the repo Why use Flutter Process Text? Flutter Process Text Plugin is known for : Flutter Process Text

Divyanshu Shekhar 14 Jul 1, 2022
Flutter plugin to listen to the process text intent stream.

Flutter Process Text Plugin Compatibility ✅ Android ❌ iOS (active issue: iOS support) Show some ❤️ and ⭐ the repo Why use Flutter Process Text? Flutte

Devs On Flutter 14 Jul 1, 2022
🔥🔥🔥 Flutter 广告插件 -- 腾讯广告、广点通、优量汇 (支持开屏、插屏、激励视频、Banner)

一款优质的 Flutter 广告插件(腾讯广告、广点通、优量汇) 插件特点 ?? 接入简单快速(封装原生端配置,仅需引入即可开始) ?? 事件统一返回(将原生端各种重要回调事件统一返回,方便业务处理和埋点统计等需求) ?? 注重优化体验(无闪烁 Logo 开屏、权限申请、隐私跟踪申请等) ?? 极客

null 86 Jan 5, 2023
Plugin-fineagent - A plugin for the ja-netfilter, it allows you to use fineagent in ja-netfilter.

plugin-fineagent A plugin for the ja-netfilter, it allows you to use fineagent in ja-netfilter. Use the mvn clean package command to compile and use F

null 19 Jun 25, 2022
:package: Gradle/Maven plugin to package Java applications as native Windows, Mac OS X, or GNU/Linux executables and create installers for them.

JavaPackager JavaPackager is a hybrid plugin for Maven and Gradle which provides an easy way to package Java applications in native Windows, Mac OS X

Francisco Vargas Ruiz 665 Jan 8, 2023
maven plugin for making chmod +x jar files

To use it, add a plugin to your pom like <!-- You need to build an exectuable uberjar, I like Shade for that --> <plugin> <groupId>org.apache.mave

Brian McCallister 113 Dec 8, 2022
Launch4j Maven Plugin

Launch4j Maven Plugin

Lukasz Lenart 301 Dec 29, 2022
A BurpSuite plugin for BBRF

bbrf-burp-plugin What's BBRF? The Bug Bounty Reconnaissance Framework (BBRF) is intended to facilitate the workflows of security researchers across mu

Pieter 19 Jun 22, 2022
Maven plugin to help creating CHANGELOG by keeping one format and solving merge request conflicts problem by extraction of new CHANGELOG entries to seperate files.

keep-changelog-maven-plugin CHANGELOG.md is one of the most important files in a repository. It allows others to find out about the most important cha

Piotr Zmilczak 22 Aug 28, 2022
HopLa Burp Suite Extender plugin - Adds autocompletion support and useful payloads in Burp Suite

HopLa ?? All the power of PayloadsAllTheThings, without the overhead. This extension adds autocompletion support and useful payloads in Burp Suite to

Synacktiv 522 Dec 24, 2022
AspectJ Maven Plugin

AspectJ Maven Plugin Overview This plugin weaves AspectJ aspects into your classes using the AspectJ compiler ajc. Typically, aspects are used in one

null 19 Dec 9, 2022
Ask and replay plugin for Mirai-Console

EntryLib EntryLib 是一个基于 Mirai-Console 的插件,用于实现群词条、自定义回复或更多功能。 目录 声明 使用方法 基本指令列表 额外说明 配置项 控制台 数据库结构 To-Do List 插件依赖 声明 本插件仅作为学习交流等使用,请勿用于盈利,否则法律后果自负。 欢

Bill Yang 33 Oct 25, 2022
This simple Android Studio plugin includes keyboard shortcuts for many common actions.

Hotkeys This simple Android Studio plugin includes keyboard shortcuts for many common actions. Features • Build process • Contribute • License Feature

SACHIN KASARADDI 14 Apr 26, 2022
A simple but helpful fight plugin with rank support

RankFight A simple but helpful fight plugin with rank support HighLights PlceholderAPI Support %rankfight_rank% %rankfight_credit% %rankfight_shopCred

贺兰星辰 5 Nov 20, 2021
Ghidra Wasm plugin with disassembly and decompilation support

Module to load WebAssembly files into Ghidra, supporting disassembly and decompilation. This plugin borrows loader functionality from this repo: https

Garrett Gu 54 Nov 22, 2022
The best plugin to protect anarchy servers and mc servers in general against op attacks.

AdminSecure The best plugin to protect anarchy servers and mc servers in general against op attacks How does it work? When the server detects a player

PK2_Stimpy 3 Sep 2, 2021
Source code of Trend's Manhunt plugin

Trend's Manhunt This is the official repository of my Manhunt plugin. Contribution You are allowed to contribute, but NOT to yoink all of my plugin co

flpae 1 Oct 19, 2022
GMC-Tools - Plugin with basic tools for Minecraft server administrator

GMC-Tools - Plugin with basic tools for Minecraft server administrator. Currently we do not support configuration files and we do not recommend using this plugin on production servers.

GamesMC Studios 4 Jan 14, 2022
QuickShell is an Eclipse plugin to use Java JShell inside the Eclipse IDE.

QuickShell is an Eclipse plugin to use Java JShell (REPL) inside Eclipse IDE. JDK 9+ is not installed on your system? No worries, you can still use Qu

Nilesh Khaire 8 Oct 3, 2022